git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Added sensitivity to Ext_example_lists.
commitf0b9d52fd3fcdd61e1ea7f5ac98eefe7e502cf8a authorJohn MacFarlane <jgm@berkeley.edu> dateFri 27 Jul 2012, 16:00 (14 years ago) parentec7c163
2 files changed+4−1
src/Text/Pandoc/Options.hs+1 src/Text/Pandoc/Readers/Markdown.hs+3−1
src/Text/Pandoc/Options.hs+1
@@ -63,6 +63,7 @@ data Extension = Ext_footnotes
6363 | Ext_fancy_lists
6464 | Ext_startnum
6565 | Ext_definition_lists
66+ | Ext_example_lists
6667 | Ext_header_identifiers
6768 | Ext_all_symbols_escapable
6869 | Ext_intraword_underscores
src/Text/Pandoc/Readers/Markdown.hs+3−1
@@ -592,9 +592,10 @@ listItem start = try $ do
592592orderedList :: Parser [Char] ParserState Block
593593orderedList = try $ do
594594 (start, style, delim) <- lookAhead anyOrderedListStart
595− unless ((style == DefaultStyle || style == Decimal) &&
595+ unless ((style == DefaultStyle || style == Decimal || style == Example) &&
596596 (delim == DefaultDelim || delim == Period)) $
597597 guardEnabled Ext_fancy_lists
598+ when (style == Example) $ guardEnabled Ext_example_lists
598599 items <- many1 $ listItem $ try $
599600 do optional newline -- if preceded by a Plain block in a list context
600601 skipNonindentSpaces
@@ -1024,6 +1025,7 @@ ltSign = do
10241025
10251026exampleRef :: Parser [Char] ParserState Inline
10261027exampleRef = try $ do
1028+ guardEnabled Ext_example_lists
10271029 char '@'
10281030 lab <- many1 (alphaNum <|> oneOf "-_")
10291031 -- We just return a Str. These are replaced with numbers