Man reader: ignore \s font size changes.

This commit is contained in:
John MacFarlane 2018-10-23 10:49:21 -07:00
parent 55315ed0d8
commit c916a07bad

View file

@ -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