diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 | ||||
-rw-r--r-- | test/command/4908.md | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 502abae9a..5f6788887 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -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) diff --git a/test/command/4908.md b/test/command/4908.md new file mode 100644 index 000000000..2ff1a4603 --- /dev/null +++ b/test/command/4908.md @@ -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 +``` |