From 55068c4caedc148f560892e3fcb10a96b6ba5b4f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 23 Oct 2018 23:35:37 -0700 Subject: Man reader: Add placeholder for table token. --- src/Text/Pandoc/Readers/Man.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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. -- cgit v1.2.3