git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: example_lists should work without startnum.

Closes #4908.

commit44e4f7b29278897814f1b1913d3d9a863d9070f8 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 16 Sep 2018, 20:32 (8 years ago) parent47034fd
2 files changed+19−1
src/Text/Pandoc/Readers/Markdown.hs+3−1 test/command/4908.md+16
src/Text/Pandoc/Readers/Markdown.hs+3−1
@@ -970,7 +970,9 @@ orderedList = try $ do
970970 <|> return (style == Example)
971971 items <- fmap sequence $ many1 $ listItem fourSpaceRule
972972 (orderedListStart (Just (style, delim)))
973− start' <- (start <$ guardEnabled Ext_startnum) <|> return 1
973+ start' <- if style == Example
974+ then return start
975+ else (start <$ guardEnabled Ext_startnum) <|> return 1
974976 return $ B.orderedListWith (start', style, delim) <$> fmap compactify items
975977
976978bulletList :: PandocMonad m => MarkdownParser m (F Blocks)
test/command/4908.mdnew file+16
@@ -0,0 +1,16 @@
1+```
2+% pandoc -f markdown_mmd+fancy_lists+example_lists -t native -t plain
3+(@) Example one
4+(@) Example two
5+
6+some text
7+
8+(@) Example three
9+^D
10+(1) Example one
11+(2) Example two
12+
13+some text
14+
15+(3) Example three
16+```