Markdown reader: example_lists should work without startnum.

Closes  #4908.
This commit is contained in:
John MacFarlane 2018-09-16 20:32:42 -07:00
parent 47034fd781
commit 44e4f7b292
2 changed files with 19 additions and 1 deletions

View file

@ -970,7 +970,9 @@ orderedList = try $ do
<|> return (style == Example)
items <- fmap sequence $ many1 $ listItem fourSpaceRule
(orderedListStart (Just (style, delim)))
start' <- (start <$ guardEnabled Ext_startnum) <|> return 1
start' <- if style == Example
then return start
else (start <$ guardEnabled Ext_startnum) <|> return 1
return $ B.orderedListWith (start', style, delim) <$> fmap compactify items
bulletList :: PandocMonad m => MarkdownParser m (F Blocks)

16
test/command/4908.md Normal file
View file

@ -0,0 +1,16 @@
```
% pandoc -f markdown_mmd+fancy_lists+example_lists -t native -t plain
(@) Example one
(@) Example two
some text
(@) Example three
^D
(1) Example one
(2) Example two
some text
(3) Example three
```