diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index 90190c082..e5382e306 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -885,7 +885,12 @@ dimenarg = try $ do optional sp ch <- option False $ True <$ symbol '=' minus <- option "" $ "-" <$ symbol '-' - Tok _ _ s1 <- satisfyTok isWordTok + s1 <- option "" + (do Tok _ _ s1 <- satisfyTok isWordTok + guard (case T.uncons s1 of + Just (c,_) -> isDigit c + Nothing -> False) + pure s1) s2 <- option "" $ try $ do symbol '.' Tok _ _ t <- satisfyTok isWordTok diff --git a/test/command/9902.md b/test/command/9902.md new file mode 100644 index 000000000..e7122b587 --- /dev/null +++ b/test/command/9902.md @@ -0,0 +1,6 @@ +``` +% pandoc -t native -f latex+raw_tex +\kern.1pt +^D +[ RawBlock (Format "latex") "\\kern.1pt" ] +```