mirror of
https://github.com/typst/typst
synced 2025-05-22 04:55:29 +08:00
fix annotation syntax in comments
This commit is contained in:
parent
fb77128423
commit
a5d36d6931
@ -97,7 +97,7 @@ impl<'a> AnnotationName<'a> {
|
||||
}
|
||||
|
||||
node! {
|
||||
/// An annotation: `/! allow("warning")`.
|
||||
/// An annotation: `// @allow("warning")`.
|
||||
Annotation
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user