git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Added sensitivity to Ext_example_lists.
f0b9d52John MacFarlane
src/Text/Pandoc/Options.hs+1
@@ -63,6 +63,7 @@ data Extension = Ext_footnotes
63 | Ext_fancy_lists
63 | Ext_fancy_lists
64 | Ext_startnum
64 | Ext_startnum
65 | Ext_definition_lists
65 | Ext_definition_lists
66+ | Ext_example_lists
66 | Ext_header_identifiers
67 | Ext_header_identifiers
67 | Ext_all_symbols_escapable
68 | Ext_all_symbols_escapable
68 | Ext_intraword_underscores
69 | Ext_intraword_underscores
src/Text/Pandoc/Readers/Markdown.hs+3−1
@@ -592,9 +592,10 @@ listItem start = try $ do
592orderedList :: Parser [Char] ParserState Block
592orderedList :: Parser [Char] ParserState Block
593orderedList = try $ do
593orderedList = try $ do
594 (start, style, delim) <- lookAhead anyOrderedListStart
594 (start, style, delim) <- lookAhead anyOrderedListStart
595− unless ((style == DefaultStyle || style == Decimal) &&
595+ unless ((style == DefaultStyle || style == Decimal || style == Example) &&
596 (delim == DefaultDelim || delim == Period)) $
596 (delim == DefaultDelim || delim == Period)) $
597 guardEnabled Ext_fancy_lists
597 guardEnabled Ext_fancy_lists
598+ when (style == Example) $ guardEnabled Ext_example_lists
598 items <- many1 $ listItem $ try $
599 items <- many1 $ listItem $ try $
599 do optional newline -- if preceded by a Plain block in a list context
600 do optional newline -- if preceded by a Plain block in a list context
600 skipNonindentSpaces
601 skipNonindentSpaces
@@ -1024,6 +1025,7 @@ ltSign = do
1024
1025
1025exampleRef :: Parser [Char] ParserState Inline
1026exampleRef :: Parser [Char] ParserState Inline
1026exampleRef = try $ do
1027exampleRef = try $ do
1028+ guardEnabled Ext_example_lists
1027 char '@'
1029 char '@'
1028 lab <- many1 (alphaNum <|> oneOf "-_")
1030 lab <- many1 (alphaNum <|> oneOf "-_")
1029 -- We just return a Str. These are replaced with numbers
1031 -- We just return a Str. These are replaced with numbers