Markdown reader: Added sensitivity to Ext_example_lists.

This commit is contained in:
John MacFarlane
2012-07-27 16:00:27 -07:00
parent ec7c1631a5
commit f0b9d52fd3
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -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
+3 -1
View File
@@ -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