summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/math
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2023-11-15 14:49:29 +0100
committerGitHub <noreply@github.com>2023-11-15 14:49:29 +0100
commitf39a8bc01521d55da5296dccef8fb7dd9d3f6327 (patch)
treebb4c1ee2d47e24853ce214d7f2ed2c349b12dd16 /crates/typst-library/src/math
parentf56813a7789fc176a6008b4bfc48612509ef95cc (diff)
Add span information to realized `ParElem` (#2675)
Diffstat (limited to 'crates/typst-library/src/math')
-rw-r--r--crates/typst-library/src/math/ctx.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/typst-library/src/math/ctx.rs b/crates/typst-library/src/math/ctx.rs
index 2637921c..789bd332 100644
--- a/crates/typst-library/src/math/ctx.rs
+++ b/crates/typst-library/src/math/ctx.rs
@@ -252,7 +252,9 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> {
// because it will be placed somewhere probably not at the left margin
// it will overflow. So emulate an `hbox` instead and allow the paragraph
// to extend as far as needed.
+ let span = elem.span();
let frame = ParElem::new(vec![Prehashed::new(elem)])
+ .spanned(span)
.layout(
self.vt,
self.outer.chain(&self.local),