1 parent
bb5f4c9b22
commit
ee5fe9bf2c
2 files changed
+12
-2
No files matched your search
@@ -547,7 +547,7 @@ bulletListStart :: Monad m => ParserT [Char] st m Int
|
||||
bulletListStart = try $ do
|
||||
notFollowedBy' hrule -- because hrules start out just like lists
|
||||
marker <- oneOf bulletListMarkers
|
||||
white <- many1 spaceChar
|
||||
white <- many1 spaceChar <|> "" <$ lookAhead (char '\n')
|
||||
return $ length (marker:white)
|
||||
|
||||
-- parses ordered list start and returns its length (inc following whitespace)
|
||||
@@ -556,7 +556,7 @@ orderedListStart :: Monad m => ListNumberStyle
|
||||
-> RSTParser m Int
|
||||
orderedListStart style delim = try $ do
|
||||
(_, markerLen) <- withHorizDisplacement (orderedListMarker style delim)
|
||||
white <- many1 spaceChar
|
||||
white <- many1 spaceChar <|> "" <$ lookAhead (char '\n')
|
||||
return $ markerLen + length white
|
||||
|
||||
-- parse a line of a list item
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
```
|
||||
% pandoc -f rst -t native
|
||||
-
|
||||
a
|
||||
- b
|
||||
^D
|
||||
[BulletList
|
||||
[[Plain [Str "a"]]
|
||||
,[Plain [Str "b"]]]]
|
||||
```
|
||||
Reference in new issue
Block a user