mirror of https://github.com/stelzo/typst.git
Fix delimiter unparen syntax (#5739)
This commit is contained in:
parent
b3fb6c2326
commit
f7bd03dd76
|
|
@ -442,10 +442,10 @@ fn math_unparen(p: &mut Parser, m: Marker) {
|
|||
if first.text() == "(" && last.text() == ")" {
|
||||
first.convert_to_kind(SyntaxKind::LeftParen);
|
||||
last.convert_to_kind(SyntaxKind::RightParen);
|
||||
// Only convert if we did have regular parens.
|
||||
node.convert_to_kind(SyntaxKind::Math);
|
||||
}
|
||||
}
|
||||
|
||||
node.convert_to_kind(SyntaxKind::Math);
|
||||
}
|
||||
|
||||
/// The unicode math class of a string. Only returns `Some` if `text` has
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 493 B |
|
|
@ -125,3 +125,11 @@ $ lr(size: #3em, |)_a^b lr(size: #3em, zws|)_a^b
|
|||
--- issue-4188-lr-corner-brackets ---
|
||||
// Test positioning of U+231C to U+231F
|
||||
$⌜a⌟⌞b⌝$ = $⌜$$a$$⌟$$⌞$$b$$⌝$
|
||||
|
||||
--- math-lr-unparen ---
|
||||
// Test that unparen with brackets stays as an LrElem.
|
||||
#let item = $limits(sum)_i$
|
||||
$
|
||||
1 / ([item]) quad
|
||||
1 / [item]
|
||||
$
|
||||
|
|
|
|||
Loading…
Reference in New Issue