summaryrefslogtreecommitdiff
path: root/crates/typst-syntax/src
diff options
context:
space:
mode:
authortingerrr <me@tinger.dev>2024-02-29 09:51:56 +0100
committerGitHub <noreply@github.com>2024-02-29 08:51:56 +0000
commit5a03c818c8b595c9bb62613c8da6d7464ccff05c (patch)
tree21cd4d3664dac88f43350b14ceb227b716f295ec /crates/typst-syntax/src
parentedf957399c59332f1472321e72106d31fc9f610b (diff)
Add `depth` and `offset` field to `heading` (#3038)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates/typst-syntax/src')
-rw-r--r--crates/typst-syntax/src/ast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-syntax/src/ast.rs b/crates/typst-syntax/src/ast.rs
index 26a26160..8f8eaac4 100644
--- a/crates/typst-syntax/src/ast.rs
+++ b/crates/typst-syntax/src/ast.rs
@@ -695,7 +695,7 @@ impl<'a> Heading<'a> {
}
/// The section depth (number of equals signs).
- pub fn level(self) -> NonZeroUsize {
+ pub fn depth(self) -> NonZeroUsize {
self.0
.children()
.find(|node| node.kind() == SyntaxKind::HeadingMarker)