aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-20 12:06:15 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-20 15:30:31 -0700
commitbb11f5fb86993559f9999d4795355b02ae78cc3d (patch)
tree6dbf8c51250db532167b08c0197cbeb79279ba30 /src/Text/Pandoc/Readers/LaTeX/Parsing.hs
parent4e990a8cf9207f2315d6a55a45c93c2857663316 (diff)
downloadpandoc-bb11f5fb86993559f9999d4795355b02ae78cc3d.tar.gz
LaTeX reader: More siunitx improvements. Closes #6658.
There's still one slight divergence from the siunitx behavior: we get 'kg m/A/s' instead of 'kg m/(A s)'. At the moment I'm not going to worry about that.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX/Parsing.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
index b6804a825..1c77eb299 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
@@ -806,7 +806,8 @@ withRaw parser = do
keyval :: PandocMonad m => LP m (Text, Text)
keyval = try $ do
- Tok _ Word key <- satisfyTok isWordTok
+ key <- untokenize <$> many1 (notFollowedBy (symbol '=') >>
+ (symbol '-' <|> symbol '_' <|> satisfyTok isWordTok))
sp
val <- option mempty $ do
symbol '='