summaryrefslogtreecommitdiff
path: root/crates/typst-syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-syntax/src')
-rw-r--r--crates/typst-syntax/src/ast.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs
index 2ea318a7..65a91629 100644
--- a/crates/typst-syntax/src/ast.rs
+++ b/crates/typst-syntax/src/ast.rs
@@ -848,9 +848,9 @@ impl MathAttach {
.find_map(SyntaxNode::cast)
}
- /// Extract primes if present.
+ /// Extract attached primes if present.
pub fn primes(&self) -> Option<MathPrimes> {
- self.0.cast_first_match()
+ self.0.children().nth(1).and_then(|n| n.cast())
}
}