From 75f6af5c12c4781db74f67cb2aaf043303892032 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 5 Sep 2019 07:01:07 -0700 Subject: [PATCH] Roff reader: improve handling of groups. --- src/Text/Pandoc/Readers/Roff.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Text/Pandoc/Readers/Roff.hs b/src/Text/Pandoc/Readers/Roff.hs index 4c7b8499f..5ba5a28b9 100644 --- a/src/Text/Pandoc/Readers/Roff.hs +++ b/src/Text/Pandoc/Readers/Roff.hs @@ -522,10 +522,8 @@ lexGroup = do groupstart mconcat <$> manyTill manToken groupend where - groupstart = try $ string "\\{\\" >> newline - groupend = try $ optional (char '.' >> many spacetab) >> - string "\\}" >> (lexLine <|> lexEmptyLine) - -- could be comment + groupstart = try $ string "\\{" <* optional (try (string "\\\n")) + groupend = try $ string "\\}" lexIncludeFile :: PandocMonad m => [Arg] -> RoffLexer m RoffTokens lexIncludeFile args = do