aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs10
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.