diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-20 12:06:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-20 15:30:31 -0700 |
commit | bb11f5fb86993559f9999d4795355b02ae78cc3d (patch) | |
tree | 6dbf8c51250db532167b08c0197cbeb79279ba30 /src/Text/Pandoc/Readers/LaTeX/Parsing.hs | |
parent | 4e990a8cf9207f2315d6a55a45c93c2857663316 (diff) | |
download | pandoc-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.hs | 3 |
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 '=' |