diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-29 19:21:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-29 19:21:01 +0200 |
| commit | 24e26b8c771f09965422cf7b0acde3d694811f7e (patch) | |
| tree | 6df2866174723e8ace3f97bbb91967c8fa975174 /macros | |
| parent | e13fc04c3e973da60d5f4e9cc6fc38105cd2ddf9 (diff) | |
Fix styling of text operators
Diffstat (limited to 'macros')
| -rw-r--r-- | macros/src/element.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/macros/src/element.rs b/macros/src/element.rs index dd837754..37ca19eb 100644 --- a/macros/src/element.rs +++ b/macros/src/element.rs @@ -204,6 +204,11 @@ fn create(element: &Elem) -> TokenStream { pub fn span(&self) -> ::typst::syntax::Span { self.0.span() } + + /// Set the element's span. + pub fn spanned(self, span: ::typst::syntax::Span) -> Self { + Self(self.0.spanned(span)) + } } #element_impl |
