Roff reader: improve handling of groups.

This commit is contained in:
John MacFarlane 2019-09-05 07:01:07 -07:00
parent 0e31483d43
commit 75f6af5c12

View file

@ -522,10 +522,8 @@ lexGroup = do
groupstart groupstart
mconcat <$> manyTill manToken groupend mconcat <$> manyTill manToken groupend
where where
groupstart = try $ string "\\{\\" >> newline groupstart = try $ string "\\{" <* optional (try (string "\\\n"))
groupend = try $ optional (char '.' >> many spacetab) >> groupend = try $ string "\\}"
string "\\}" >> (lexLine <|> lexEmptyLine)
-- could be comment
lexIncludeFile :: PandocMonad m => [Arg] -> RoffLexer m RoffTokens lexIncludeFile :: PandocMonad m => [Arg] -> RoffLexer m RoffTokens
lexIncludeFile args = do lexIncludeFile args = do