From a5d36d6931d1c1032656d85309304385c6966254 Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:02:10 -0300 Subject: [PATCH] fix annotation syntax in comments --- crates/typst-syntax/src/ast.rs | 2 +- crates/typst-syntax/src/lexer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs index 88a08e0a0..0bde4ff93 100644 --- a/crates/typst-syntax/src/ast.rs +++ b/crates/typst-syntax/src/ast.rs @@ -97,7 +97,7 @@ impl<'a> AnnotationName<'a> { } node! { - /// An annotation: `/! allow("warning")`. + /// An annotation: `// @allow("warning")`. Annotation } diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs index af64333bb..3c4e81f93 100644 --- a/crates/typst-syntax/src/lexer.rs +++ b/crates/typst-syntax/src/lexer.rs @@ -231,7 +231,7 @@ impl Lexer<'_> { /// The lexer is fully responsible for the annotation, as it is simpler to /// parse them at the character level, given they follow a very simple /// and rigid structure, in the form - /// `/! annotation-name("string argument1", "string argument2")` + /// `// @annotation-name("string argument1", "string argument2")` /// with optional whitespaces and comments between arguments. fn annotation(&mut self, start: usize) -> SyntaxNode { // Start by lexing the marker.