summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-10-09 10:32:31 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-10-09 10:32:31 -0700
commit1af8bc6f4d61c7b94839ca26f7ce8f59eb5aaf18 (patch)
tree5acc6a425fc8ca4eb56aa0d211329c796dd3c47d /src
parentc13494c8089fcbac70c83967ceaa5e88cdd30fac (diff)
LaTeX reader: don't eat whitespace after macro with only opt arg.
Closes #2446.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index ed0291051..6efa64ec8 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -234,7 +234,9 @@ blocks = mconcat <$> many block
getRawCommand :: String -> LP String
getRawCommand name' = do
- rawargs <- withRaw (skipopts *> option "" dimenarg *> many braced)
+ rawargs <- withRaw (opt `sepBy` (optional sp) *>
+ option "" (optional sp *> dimenarg) *>
+ many braced)
return $ '\\' : name' ++ snd rawargs
lookupListDefault :: (Ord k) => v -> [k] -> M.Map k v -> v