Don't stop parsing markup text for braces (#3112)

This commit is contained in:
Nathan Varner 2024-01-02 04:08:07 -05:00 committed by GitHub
parent a236e362db
commit 527d63ed25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -311,8 +311,8 @@ impl Lexer<'_> {
table! {
| ' ' | '\t' | '\n' | '\x0b' | '\x0c' | '\r' | '\\' | '/'
| '[' | ']' | '{' | '}' | '~' | '-' | '.' | '\'' | '"'
| '*' | '_' | ':' | 'h' | '`' | '$' | '<' | '>' | '@' | '#'
| '[' | ']' | '~' | '-' | '.' | '\'' | '"' | '*' | '_'
| ':' | 'h' | '`' | '$' | '<' | '>' | '@' | '#'
};
loop {

View File

@ -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]