diff --git a/crates/typst-pdf/src/tags/mod.rs b/crates/typst-pdf/src/tags/mod.rs index 5c7720e44..e2b5d975f 100644 --- a/crates/typst-pdf/src/tags/mod.rs +++ b/crates/typst-pdf/src/tags/mod.rs @@ -294,11 +294,10 @@ pub fn handle_end( return Ok(()); } - // FIXME: Overlapping tags in artifacts will break the close mechanism. - if let Some((l, _)) = gc.tags.in_artifact { - if l == loc { - pop_artifact(gc, surface); - } + if let Some((l, _)) = gc.tags.in_artifact + && l == loc + { + pop_artifact(gc, surface); return Ok(()); }