diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-10-09 10:32:31 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-10-09 10:32:31 -0700 |
commit | 1af8bc6f4d61c7b94839ca26f7ce8f59eb5aaf18 (patch) | |
tree | 5acc6a425fc8ca4eb56aa0d211329c796dd3c47d /src/Text/Pandoc | |
parent | c13494c8089fcbac70c83967ceaa5e88cdd30fac (diff) | |
download | pandoc-1af8bc6f4d61c7b94839ca26f7ce8f59eb5aaf18.tar.gz |
LaTeX reader: don't eat whitespace after macro with only opt arg.
Closes #2446.
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 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 |