summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-07-16 17:02:10 -0300
committerPgBiel <9021226+PgBiel@users.noreply.github.com>2024-07-16 17:03:45 -0300
commita5d36d6931d1c1032656d85309304385c6966254 (patch)
tree47f0ff782b2fc5d79eac0141195db8dd19498354
parentfb77128423b4732c349620cef886f2cfecf8bf50 (diff)
fix annotation syntax in comments
-rw-r--r--crates/typst-syntax/src/ast.rs2
-rw-r--r--crates/typst-syntax/src/lexer.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs
index 88a08e0a..0bde4ff9 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 af64333b..3c4e81f9 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.