diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index b0925ac68..792c0269a 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -219,10 +219,6 @@ parseMarkdown = do $ B.setDate (runF date st) $ B.doc $ runF blocks st --- --- initial pass for references and notes --- - referenceKey :: Parser [Char] ParserState (F Blocks) referenceKey = try $ do skipNonindentSpaces @@ -256,6 +252,20 @@ referenceTitle = try $ do notFollowedBy (noneOf ")\n"))) return $ fromEntities tit +-- | PHP Markdown Extra style abbreviation key. Currently +-- we just skip them, since Pandoc doesn't have an element for +-- an abbreviation. +abbrevKey :: Parser [Char] ParserState (F Blocks) +abbrevKey = do + guardEnabled Ext_abbreviations + try $ do + char '*' + reference + char ':' + skipMany (satisfy (/= '\n')) + blanklines + return $ return mempty + noteMarker :: Parser [Char] ParserState String noteMarker = string "[^" >> many1Till (satisfy $ not . isBlank) (char ']') @@ -311,6 +321,7 @@ block = choice [ codeBlockDelimited , definitionList , noteBlock , referenceKey + , abbrevKey , para , plain ] <?> "block" |