diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 10 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 5e5324f79..33c4a75ee 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -322,7 +322,7 @@ itemBlock = try (do -- specialEnvironment = do -- these are always parsed as raw - followedBy' (choice (map (\name -> begin name) ["tabular", "figure", + lookAhead (choice (map (\name -> begin name) ["tabular", "figure", "tabbing", "eqnarry", "picture", "table", "verse", "theorem"])) rawLaTeXEnvironment diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index afd0056ab..a94a0a06e 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -394,7 +394,7 @@ rawListItem start = try (do -- or (in compact lists) endline. -- note: nested lists are parsed as continuations listContinuation start = try (do - followedBy' indentSpaces + lookAhead indentSpaces result <- many1 (listContinuationLine start) blanks <- many blankline return ((concat result) ++ blanks)) @@ -443,10 +443,10 @@ para = try (do newline st <- getState if stateStrict st - then choice [followedBy' blockQuote, followedBy' header, - (do{blanklines; return ()})] - else choice [followedBy' emacsBoxQuote, - (do{blanklines; return ()})] + then choice [lookAhead blockQuote, lookAhead header, + (do{blanklines; return Null})] + else choice [(do{lookAhead emacsBoxQuote; return Null}), + (do{blanklines; return Null})] let result' = normalizeSpaces result return (Para result')) diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 29518fbe1..70d55476e 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -198,7 +198,7 @@ codeBlockStart = try (do -- paragraph that ends in a :: starting a code block paraBeforeCodeBlock = try (do result <- many1 (do {notFollowedBy' codeBlockStart; inline}) - followedBy' (string "::") + lookAhead (string "::") return (Para (if (last result == Space) then normalizeSpaces result else (normalizeSpaces result) ++ [Str ":"]))) @@ -446,7 +446,7 @@ listItem start = try (do rest <- many (listContinuation markerLength) blanks <- choice [ try (do b <- many blankline - followedBy' start + lookAhead start return b), many1 blankline ] -- whole list must end with blank -- parsing with ListItemState forces markers at beginning of lines to |