From 35e05449777255b624f0e8cb374e1fcdca86ba78 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 22 Dec 2015 11:06:06 -0800 Subject: LaTeX reader: allow blank space between braced arguments of commands. For example \foo {bar} {baz} Closes #2592. --- src/Text/Pandoc/Readers/LaTeX.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 5a4612862..d2e8d9d17 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -132,7 +132,9 @@ comment = do return () bgroup :: LP () -bgroup = () <$ char '{' +bgroup = try $ do + skipMany (spaceChar <|> try (newline <* notFollowedBy blankline)) + () <$ char '{' <|> () <$ controlSeq "bgroup" <|> () <$ controlSeq "begingroup" -- cgit v1.2.3