diff options
-rw-r--r-- | src/Text/Pandoc/Options.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index efcb0ea52..c64f7f1cb 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -63,6 +63,7 @@ data Extension = Ext_footnotes | Ext_fancy_lists | Ext_startnum | Ext_definition_lists + | Ext_example_lists | Ext_header_identifiers | Ext_all_symbols_escapable | Ext_intraword_underscores diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 7f4ed6d3e..545f34ca1 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -592,9 +592,10 @@ listItem start = try $ do orderedList :: Parser [Char] ParserState Block orderedList = try $ do (start, style, delim) <- lookAhead anyOrderedListStart - unless ((style == DefaultStyle || style == Decimal) && + unless ((style == DefaultStyle || style == Decimal || style == Example) && (delim == DefaultDelim || delim == Period)) $ guardEnabled Ext_fancy_lists + when (style == Example) $ guardEnabled Ext_example_lists items <- many1 $ listItem $ try $ do optional newline -- if preceded by a Plain block in a list context skipNonindentSpaces @@ -1024,6 +1025,7 @@ ltSign = do exampleRef :: Parser [Char] ParserState Inline exampleRef = try $ do + guardEnabled Ext_example_lists char '@' lab <- many1 (alphaNum <|> oneOf "-_") -- We just return a Str. These are replaced with numbers |