Man reader: Add placeholder for table token.
This commit is contained in:
parent
8efb8975ed
commit
55068c4cae
1 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue