diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-20 11:06:30 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-20 11:06:30 -0700 |
commit | 3e23b472f2ec46b5658de8c677f534c5b82c3d25 (patch) | |
tree | 89628b55061416bbb0a5ea97d1a2b2c2c8727f6c /src/Text/Pandoc/Readers/Man.hs | |
parent | 446790e95b8cb913750f879a9152d8191be7e1ce (diff) | |
download | pandoc-3e23b472f2ec46b5658de8c677f534c5b82c3d25.tar.gz |
Man reader: skip macro definitions for now.
Diffstat (limited to 'src/Text/Pandoc/Readers/Man.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index d081a5752..6a89f25d9 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -136,6 +136,7 @@ parseBlock = choice [ parseList , parseSkippedContent , parseCodeBlock , parseHeader + , parseMacroDef , parseSkipMacro ] @@ -567,6 +568,17 @@ definitionListItem = try $ do parseDefinitionList :: PandocMonad m => ManParser m Blocks parseDefinitionList = definitionList <$> many1 definitionListItem +parseMacroDef :: PandocMonad m => ManParser m Blocks +parseMacroDef = do + MMacro _ _args <- mmacro "de" + bs <- manyTill parseBlock endMacro + return mempty -- TODO for now just skip it + + where + endMacro = (msatisfy (\t -> case t of + MEndMacro -> True + _ -> False)) + -- In case of weird man file it will be parsed succesfully parseSkipMacro :: PandocMonad m => ManParser m Blocks parseSkipMacro = do |