diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/eval-mode.png | bin | 881 -> 850 bytes | |||
| -rw-r--r-- | tests/ref/issue-785-cite-locate.png | bin | 15456 -> 15194 bytes | |||
| -rw-r--r-- | tests/ref/link-on-block.png | bin | 2423 -> 2422 bytes | |||
| -rw-r--r-- | tests/ref/locate-position-trailing-tag.png | bin | 0 -> 74 bytes | |||
| -rw-r--r-- | tests/ref/quote-cite-format-note.png | bin | 2943 -> 2941 bytes | |||
| -rw-r--r-- | tests/src/run.rs | 5 | ||||
| -rw-r--r-- | tests/suite/introspection/locate.typ | 7 |
7 files changed, 9 insertions, 3 deletions
diff --git a/tests/ref/eval-mode.png b/tests/ref/eval-mode.png Binary files differindex 94357ff4..5edfa62d 100644 --- a/tests/ref/eval-mode.png +++ b/tests/ref/eval-mode.png diff --git a/tests/ref/issue-785-cite-locate.png b/tests/ref/issue-785-cite-locate.png Binary files differindex 7c2a650a..bcdcc968 100644 --- a/tests/ref/issue-785-cite-locate.png +++ b/tests/ref/issue-785-cite-locate.png diff --git a/tests/ref/link-on-block.png b/tests/ref/link-on-block.png Binary files differindex 9076983d..ed73b866 100644 --- a/tests/ref/link-on-block.png +++ b/tests/ref/link-on-block.png diff --git a/tests/ref/locate-position-trailing-tag.png b/tests/ref/locate-position-trailing-tag.png Binary files differnew file mode 100644 index 00000000..b64188a7 --- /dev/null +++ b/tests/ref/locate-position-trailing-tag.png diff --git a/tests/ref/quote-cite-format-note.png b/tests/ref/quote-cite-format-note.png Binary files differindex 1092ffdb..cb2c4c0a 100644 --- a/tests/ref/quote-cite-format-note.png +++ b/tests/ref/quote-cite-format-note.png diff --git a/tests/src/run.rs b/tests/src/run.rs index 47760e16..a59ce536 100644 --- a/tests/src/run.rs +++ b/tests/src/run.rs @@ -7,7 +7,6 @@ use tiny_skia as sk; use typst::diag::SourceDiagnostic; use typst::eval::Tracer; use typst::foundations::Smart; -use typst::introspection::Meta; use typst::layout::{Abs, Frame, FrameItem, Page, Transform}; use typst::model::Document; use typst::visualize::Color; @@ -392,7 +391,7 @@ fn render_links(canvas: &mut sk::Pixmap, ts: sk::Transform, frame: &Frame) { let ts = ts.pre_concat(to_sk_transform(&group.transform)); render_links(canvas, ts, &group.frame); } - FrameItem::Meta(Meta::Link(_), size) => { + FrameItem::Link(_, size) => { let w = size.x.to_pt() as f32; let h = size.y.to_pt() as f32; let rect = sk::Rect::from_xywh(0.0, 0.0, w, h).unwrap(); @@ -416,7 +415,7 @@ fn skippable(page: &Page) -> bool { fn skippable_frame(frame: &Frame) -> bool { frame.items().all(|(_, item)| match item { FrameItem::Group(group) => skippable_frame(&group.frame), - FrameItem::Meta(..) => true, + FrameItem::Tag(_) => true, _ => false, }) } diff --git a/tests/suite/introspection/locate.typ b/tests/suite/introspection/locate.typ index 981f8c46..b3a77fde 100644 --- a/tests/suite/introspection/locate.typ +++ b/tests/suite/introspection/locate.typ @@ -4,6 +4,13 @@ = Introduction <intro> #context test(locate(<intro>).position().y, 20pt) +--- locate-position-trailing-tag --- +// Test locating the position of a tag with no following content. +#context test(here().position().y, 10pt) +#box[] +#v(10pt) +#context test(here().position().y, 20pt) + --- locate-missing-label --- // Error: 10-25 label `<intro>` does not exist in the document #context locate(<intro>) |
