diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 5 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 6ee8df7b6..abf8061e0 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -334,8 +334,9 @@ anyOrderedListStart = try $ do if stateStrict state then do many1 digit char '.' + spaceChar return (1, DefaultStyle, DefaultDelim) - else anyOrderedListMarker + else anyOrderedListMarker >>~ spaceChar orderedListStart style delim = try $ do optional newline -- if preceded by a Plain block in a list context @@ -346,7 +347,7 @@ orderedListStart style delim = try $ do char '.' return 1 else orderedListMarker style delim - oneOf spaceChars + spaceChar skipSpaces -- parse a line of a list item (start = parser for beginning of list item) diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index ce8fedf02..878c1355c 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -418,7 +418,7 @@ listItem start = try $ do return parsed orderedList = try $ do - (start, style, delim) <- lookAhead anyOrderedListMarker + (start, style, delim) <- lookAhead (anyOrderedListMarker >>~ spaceChar) items <- many1 (listItem (orderedListStart style delim)) let items' = compactify items return $ OrderedList (start, style, delim) items' @@ -551,7 +551,8 @@ endline = try $ do -- parse potential list-starts at beginning of line differently in a list: st <- getState if ((stateParserContext st) == ListItemState) - then notFollowedBy' anyOrderedListMarker >> notFollowedBy' bulletListStart + then notFollowedBy (anyOrderedListMarker >> spaceChar) >> + notFollowedBy' bulletListStart else return () return Space |