@@ -281,15 +281,11 @@ indentedLine indents = try $ do
281 return $ result ++ "\n"
281 return $ result ++ "\n"
283-- two or more indented lines, possibly separated by blank lines.
283-- two or more indented lines, possibly separated by blank lines.
284−-- if variable = True, then any indent will work, but it must be
284+-- any amount of indentation will work.
285−-- consistent through the block.
286−-- if variable = False, indent should be one tab or equivalent in spaces.
287−indentedBlock variable = try $ do
285+indentedBlock = try $ do
288 state <- getState
286 state <- getState
289 let tabStop = stateTabStop state
287 let tabStop = stateTabStop state
290− indents <- if variable
291− then many1 (oneOf " \t")
288+ indents <- many1 (oneOf " \t")
292− else oneOfStrings ["\t", (replicate tabStop ' ')]
293 firstline <- manyTill anyChar newline
289 firstline <- manyTill anyChar newline
294 rest <- many (choice [ indentedLine indents,
290 rest <- many (choice [ indentedLine indents,
295 try (do b <- blanklines
291 try (do b <- blanklines
@@ -300,8 +296,7 @@ indentedBlock variable = try $ do
301codeBlock = try $ do
297codeBlock = try $ do
302 codeBlockStart
298 codeBlockStart
303− result <- indentedBlock False
299+ result <- indentedBlock
304− -- the False means we want one tab stop indent on each line
305 return $ CodeBlock $ stripTrailingNewlines result
300 return $ CodeBlock $ stripTrailingNewlines result
@@ -309,7 +304,7 @@ codeBlock = try $ do
311rawHtmlBlock = try $ string ".. raw:: html" >> blanklines >>
306rawHtmlBlock = try $ string ".. raw:: html" >> blanklines >>
312− indentedBlock True >>= return . RawHtml
307+ indentedBlock >>= return . RawHtml
315-- raw latex
310-- raw latex
@@ -318,7 +313,7 @@ rawHtmlBlock = try $ string ".. raw:: html" >> blanklines >>
318rawLaTeXBlock = try $ do
313rawLaTeXBlock = try $ do
319 string ".. raw:: latex"
314 string ".. raw:: latex"
320 blanklines
315 blanklines
321− result <- indentedBlock True
316+ result <- indentedBlock
322 return $ Para [(TeX result)]
317 return $ Para [(TeX result)]
@@ -326,7 +321,7 @@ rawLaTeXBlock = try $ do
328blockQuote = do
323blockQuote = do
329− raw <- indentedBlock True
324+ raw <- indentedBlock
330 -- parse the extracted block, which may contain various block elements:
325 -- parse the extracted block, which may contain various block elements:
331 contents <- parseFromString parseBlocks $ raw ++ "\n\n"
326 contents <- parseFromString parseBlocks $ raw ++ "\n\n"
332 return $ BlockQuote contents
327 return $ BlockQuote contents
@@ -339,7 +334,7 @@ list = choice [ bulletList, orderedList, definitionList ] <?> "list"
340definitionListItem = try $ do
335definitionListItem = try $ do
341 term <- many1Till inline endline
336 term <- many1Till inline endline
342− raw <- indentedBlock True
337+ raw <- indentedBlock
343 -- parse the extracted block, which may contain various block elements:
338 -- parse the extracted block, which may contain various block elements:
344 contents <- parseFromString parseBlocks $ raw ++ "\n\n"
339 contents <- parseFromString parseBlocks $ raw ++ "\n\n"
345 return (normalizeSpaces term, contents)
340 return (normalizeSpaces term, contents)