From 525154a730dfdb224fe2ced3dae0cfb33114fafa Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 11 Nov 2024 15:11:44 +0100 Subject: Add support for raw range spans --- crates/typst-syntax/src/source.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/typst-syntax/src/source.rs') 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> { Some(self.find(span)?.range()) } -- cgit v1.2.3