aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Man.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/Man.hs')
-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 73a7dcd72..fe6bc5c4c 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -172,6 +172,7 @@ escapeLexer = try $ do
'(' -> twoCharGlyph
'[' -> bracketedGlyph
'f' -> escFont
+ 's' -> escFontSize
'"' -> mempty <$ skipMany (satisfy (/='\n')) -- line comment
'#' -> mempty <$ manyTill anyChar newline
'%' -> return mempty
@@ -242,6 +243,15 @@ escapeLexer = try $ do
Nothing -> mzero
Just c -> return c
+ -- \s-1 \s0 -- we ignore these
+ escFontSize :: PandocMonad m => ManLexer m String
+ escFontSize = do
+ pos <- getPosition
+ pm <- option "" $ count 1 (oneOf "+-")
+ ds <- many1 digit
+ report $ SkippedContent ("\\s" ++ pm ++ ds) pos
+ return mempty
+
escFont :: PandocMonad m => ManLexer m String
escFont = do
font <- choice