From 2f81089995c87efdbce6c94bb29647cd1f213cfd Mon Sep 17 00:00:00 2001 From: sitandr <60141933+sitandr@users.noreply.github.com> Date: Thu, 10 Aug 2023 22:36:05 +0300 Subject: Fix single prime in subscript (#1909) * Fix single prime in subscript (a_' producing wrong result) * Clippy --- crates/typst-syntax/src/ast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/typst-syntax') 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 { - self.0.cast_first_match() + self.0.children().nth(1).and_then(|n| n.cast()) } } -- cgit v1.2.3