Roff reader: improve handling of groups.
commit75f6af5c12c4781db74f67cb2aaf043303892032
authorJohn MacFarlane <jgm@berkeley.edu>
dateThu 5 Sep 2019, 07:01 (7 years ago)
parent0e31483
src/Text/Pandoc/Readers/Roff.hs+2−4
@@ -522,10 +522,8 @@ lexGroup = do
522522 groupstart
523523 mconcat <$> manyTill manToken groupend
524524 where
525− groupstart = try $ string "\\{\\" >> newline
526− groupend = try $ optional (char '.' >> many spacetab) >>
527− string "\\}" >> (lexLine <|> lexEmptyLine)
528− -- could be comment
525+ groupstart = try $ string "\\{" <* optional (try (string "\\\n"))
526+ groupend = try $ string "\\}"
529527
530528lexIncludeFile :: PandocMonad m => [Arg] -> RoffLexer m RoffTokens
531529lexIncludeFile args = do