mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Don't stop parsing markup text for braces (#3112)
This commit is contained in:
parent
a236e362db
commit
527d63ed25
@ -311,8 +311,8 @@ impl Lexer<'_> {
|
||||
|
||||
table! {
|
||||
| ' ' | '\t' | '\n' | '\x0b' | '\x0c' | '\r' | '\\' | '/'
|
||||
| '[' | ']' | '{' | '}' | '~' | '-' | '.' | '\'' | '"'
|
||||
| '*' | '_' | ':' | 'h' | '`' | '$' | '<' | '>' | '@' | '#'
|
||||
| '[' | ']' | '~' | '-' | '.' | '\'' | '"' | '*' | '_'
|
||||
| ':' | 'h' | '`' | '$' | '<' | '>' | '@' | '#'
|
||||
};
|
||||
|
||||
loop {
|
||||
|
@ -301,6 +301,8 @@ mod tests {
|
||||
test("a\n#let \nb", 7..7, "i", true);
|
||||
test(r"#{{let x = z}; a = 1} b", 7..7, "//", false);
|
||||
test(r#"a ```typst hello```"#, 16..17, "", false);
|
||||
test("a{b}c", 1..1, "#", false);
|
||||
test("a#{b}c", 1..2, "", false);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
x
Reference in New Issue
Block a user