summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorNathan Varner <17197562+nvarner@users.noreply.github.com>2024-01-02 04:08:07 -0500
committerGitHub <noreply@github.com>2024-01-02 09:08:07 +0000
commit527d63ed25d668eeb24e21ff441429fbcc7ad6a5 (patch)
tree5f6f34c5f92cf004a3413bf75c457509dab7988e /crates
parenta236e362db8be16d64da26eba73c46d8cc8bb04e (diff)
Don't stop parsing markup text for braces (#3112)
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-syntax/src/lexer.rs4
-rw-r--r--crates/typst-syntax/src/reparser.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs
index ecb800ba..4800c8de 100644
--- a/crates/typst-syntax/src/lexer.rs
+++ b/crates/typst-syntax/src/lexer.rs
@@ -311,8 +311,8 @@ impl Lexer<'_> {
table! {
| ' ' | '\t' | '\n' | '\x0b' | '\x0c' | '\r' | '\\' | '/'
- | '[' | ']' | '{' | '}' | '~' | '-' | '.' | '\'' | '"'
- | '*' | '_' | ':' | 'h' | '`' | '$' | '<' | '>' | '@' | '#'
+ | '[' | ']' | '~' | '-' | '.' | '\'' | '"' | '*' | '_'
+ | ':' | 'h' | '`' | '$' | '<' | '>' | '@' | '#'
};
loop {
diff --git a/crates/typst-syntax/src/reparser.rs b/crates/typst-syntax/src/reparser.rs
index 1b7dc42f..157c075b 100644
--- a/crates/typst-syntax/src/reparser.rs
+++ b/crates/typst-syntax/src/reparser.rs
@@ -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]