aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-09-05 07:01:07 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-05 07:01:31 -0700
commit75f6af5c12c4781db74f67cb2aaf043303892032 (patch)
tree95541db239f9e5ecfe79c2f1b4fae7f0beb7d374
parent0e31483d4358a6d2b4ba96c71237e3f7b32979a1 (diff)
downloadpandoc-75f6af5c12c4781db74f67cb2aaf043303892032.tar.gz
Roff reader: improve handling of groups.
-rw-r--r--src/Text/Pandoc/Readers/Roff.hs6
1 files 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