mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 01:41:20 +08:00
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:
@@ -198,6 +198,7 @@ inlinesInBalancedBrackets =
|
||||
go openBrackets =
|
||||
(() <$ (escapedChar <|>
|
||||
code <|>
|
||||
math <|>
|
||||
rawHtmlInline <|>
|
||||
rawLaTeXInline') >> go openBrackets)
|
||||
<|>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
```
|
||||
% pandoc -t native
|
||||
[link $(0,1]$](url)
|
||||
^D
|
||||
[ Para
|
||||
[ Link
|
||||
( "" , [] , [] )
|
||||
[ Str "link" , Space , Math InlineMath "(0,1]" ]
|
||||
( "url" , "" )
|
||||
]
|
||||
]
|
||||
```
|
||||
Reference in New Issue
Block a user