aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-31 11:30:56 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-31 11:31:35 -0700
commit5f9f458df394686405b525757d1b5ef3b4cbad17 (patch)
tree4c1eefd45f6fbefaef5c2902ef33958332639e99 /src/Text/Pandoc
parentb90a0fe3dc71ac798fefc734983d5c896226be2c (diff)
downloadpandoc-5f9f458df394686405b525757d1b5ef3b4cbad17.tar.gz
LaTeX reader: handle `%` comment right after command.
For example \emph% {hi}
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index a982029af..9bac3d3a7 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1132,7 +1132,7 @@ inlineCommand' = try $ do
lookupListDefault raw names inlineCommands
tok :: PandocMonad m => LP m Inlines
-tok = grouped inline <|> inlineCommand' <|> singleChar'
+tok = try $ spaces >> grouped inline <|> inlineCommand' <|> singleChar'
where singleChar' = do
Tok _ _ t <- singleChar
return (str (T.unpack t))