Fix markdown parsing bug for math in bracketed spans and links.
This affects math with unbalanced brackets (e.g. `$(0,1]$`) inside links, images, bracketed spans. Closes #7623.
This commit is contained in:
parent
afc16f2f4b
commit
49c4e1d014
2 changed files with 13 additions and 0 deletions
|
@ -198,6 +198,7 @@ inlinesInBalancedBrackets =
|
|||
go openBrackets =
|
||||
(() <$ (escapedChar <|>
|
||||
code <|>
|
||||
math <|>
|
||||
rawHtmlInline <|>
|
||||
rawLaTeXInline') >> go openBrackets)
|
||||
<|>
|
||||
|
|
12
test/command/7623.md
Normal file
12
test/command/7623.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
```
|
||||
% pandoc -t native
|
||||
[link $(0,1]$](url)
|
||||
^D
|
||||
[ Para
|
||||
[ Link
|
||||
( "" , [] , [] )
|
||||
[ Str "link" , Space , Math InlineMath "(0,1]" ]
|
||||
( "url" , "" )
|
||||
]
|
||||
]
|
||||
```
|
Loading…
Reference in a new issue