diff options
Diffstat (limited to 'crates/typst-syntax/src/source.rs')
| -rw-r--r-- | crates/typst-syntax/src/source.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/typst-syntax/src/source.rs b/crates/typst-syntax/src/source.rs index 3454a265..6ff94c73 100644 --- a/crates/typst-syntax/src/source.rs +++ b/crates/typst-syntax/src/source.rs @@ -166,6 +166,8 @@ impl Source { /// Get the byte range for the given span in this file. /// /// Returns `None` if the span does not point into this source file. + /// + /// Typically, it's easier to use `WorldExt::range` instead. pub fn range(&self, span: Span) -> Option<Range<usize>> { Some(self.find(span)?.range()) } |
