diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-23 23:35:37 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-23 23:35:37 -0700 |
commit | 55068c4caedc148f560892e3fcb10a96b6ba5b4f (patch) | |
tree | ee1da8749451b2cd80a429a85bc13a5164f91f0e /src/Text/Pandoc/Readers | |
parent | 8efb8975ed641ddd075954e1ccc7f71eca1d3c16 (diff) | |
download | pandoc-55068c4caedc148f560892e3fcb10a96b6ba5b4f.tar.gz |
Man reader: Add placeholder for table token.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index 54d2f059f..f3013be5f 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -83,6 +83,7 @@ type Arg = [LinePart] data ManToken = MLine [LinePart] | MEmptyLine | MMacro MacroKind [Arg] SourcePos + | MTable [Alignment] ManTokens [ManTokens] [[ManTokens]] deriving Show newtype ManTokens = ManTokens { unManTokens :: Seq.Seq ManToken } @@ -309,6 +310,7 @@ lexMacro = do "ie" -> lexConditional "if" -> lexConditional "el" -> skipConditional + "TS" -> lexTable _ -> do args <- lexArgs @@ -324,6 +326,14 @@ lexMacro = do "so" -> lexIncludeFile args _ -> resolveMacro macroName args pos +-- | TODO placeholder +lexTable :: PandocMonad m => ManLexer m ManTokens +lexTable = do + pos <- getPosition + manyTill anyLine (try (string ".TE" >> many spacetab >> eofline)) + report $ SkippedContent "table" pos + return mempty + -- We don't fully handle the conditional. But we do -- include everything under '.ie n', which occurs commonly -- in man pages. We always skip the '.el' part. |