diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2017-10-17 13:54:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-17 13:54:09 -0400 |
| commit | 8aa972d9df4446edc1e89c908556bb6aac2bb3b6 (patch) | |
| tree | b9d5f2b52fbbba67f2f8153f3ca0f7258b522d75 /src/Text | |
| parent | c2de9d749cbc21386e153a4f9efc3049a299cecc (diff) | |
| parent | 9046dbadb1147a4d9e2b114a2afc1a0292ef7762 (diff) | |
| download | pandoc-8aa972d9df4446edc1e89c908556bb6aac2bb3b6.tar.gz | |
Merge pull request #3980 from bfirsh/skip-spaces-in-image-options
Latex reader: Skip spaces in image options
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 8c6c7d0ff..b3c637748 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -758,8 +758,10 @@ keyval = try $ do Tok _ Word key <- satisfyTok isWordTok let isSpecSym (Tok _ Symbol t) = t `elem` [".",":","-","|","\\"] isSpecSym _ = False + optional sp val <- option [] $ do symbol '=' + optional sp braced <|> (many1 (satisfyTok isWordTok <|> satisfyTok isSpecSym <|> anyControlSeq)) optional sp |
