git.iko.soy/typeable/pandoc
on master help sign in
Man reader: Add placeholder for table token.
commit55068c4caedc148f560892e3fcb10a96b6ba5b4f authorJohn MacFarlane <jgm@berkeley.edu> dateTue 23 Oct 2018, 23:35 (8 years ago) parent8efb897
1 file changed+10
src/Text/Pandoc/Readers/Man.hs+10
src/Text/Pandoc/Readers/Man.hs+10
@@ -83,6 +83,7 @@ type Arg = [LinePart]
8383data ManToken = MLine [LinePart]
8484 | MEmptyLine
8585 | MMacro MacroKind [Arg] SourcePos
86+ | MTable [Alignment] ManTokens [ManTokens] [[ManTokens]]
8687 deriving Show
8788
8889newtype ManTokens = ManTokens { unManTokens :: Seq.Seq ManToken }
@@ -309,6 +310,7 @@ lexMacro = do
309310 "ie" -> lexConditional
310311 "if" -> lexConditional
311312 "el" -> skipConditional
313+ "TS" -> lexTable
312314
313315 _ -> do
314316 args <- lexArgs
@@ -324,6 +326,14 @@ lexMacro = do
324326 "so" -> lexIncludeFile args
325327 _ -> resolveMacro macroName args pos
326328
329+-- | TODO placeholder
330+lexTable :: PandocMonad m => ManLexer m ManTokens
331+lexTable = do
332+ pos <- getPosition
333+ manyTill anyLine (try (string ".TE" >> many spacetab >> eofline))
334+ report $ SkippedContent "table" pos
335+ return mempty
336+
327337-- We don't fully handle the conditional. But we do
328338-- include everything under '.ie n', which occurs commonly
329339-- in man pages. We always skip the '.el' part.