diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-22 11:06:06 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-22 11:06:06 -0800 |
commit | 35e05449777255b624f0e8cb374e1fcdca86ba78 (patch) | |
tree | 5a2fb40942fdf31212b2080e2b25d551bfe3611f /src/Text/Pandoc | |
parent | 46e38d0a0a8d4e0cd4054dff19c4dd383ac7ae1c (diff) | |
download | pandoc-35e05449777255b624f0e8cb374e1fcdca86ba78.tar.gz |
LaTeX reader: allow blank space between braced arguments of commands.
For example
\foo
{bar}
{baz}
Closes #2592.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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" |