mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-01 05:33:41 +08:00
LaTeX reader: fix parsing of dimensions beginning with ..
E.g., `\kern.1pt`. Closes #9902.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
```
|
||||
% pandoc -t native -f latex+raw_tex
|
||||
\kern.1pt
|
||||
^D
|
||||
[ RawBlock (Format "latex") "\\kern.1pt" ]
|
||||
```
|
||||
Reference in New Issue
Block a user