feat: mark RepeatElem as artifact

This commit is contained in:
Tobias Schmitz 2025-06-25 17:46:36 +02:00
parent 612aa8fc53
commit 6717a18414
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,6 @@ use crate::layout::{BlockElem, Length};
/// Berlin, the 22nd of December, 2022
/// ]
/// ```
// TODO: should this be a PDF artifact by deafult?
#[elem(Locatable, Show)]
pub struct RepeatElem {
/// The content to repeat.

View File

@ -10,6 +10,7 @@ use krilla::tagging::{
};
use typst_library::foundations::{Content, LinkMarker, Packed, StyleChain};
use typst_library::introspection::Location;
use typst_library::layout::RepeatElem;
use typst_library::model::{
Destination, FigureCaption, FigureElem, HeadingElem, Outlinable, OutlineElem,
OutlineEntry, TableCell, TableElem,
@ -287,6 +288,9 @@ pub(crate) fn handle_start(gc: &mut GlobalContext, elem: &Content) {
let kind = artifact.kind(StyleChain::default());
start_artifact(gc, loc, kind);
return;
} else if let Some(_) = elem.to_packed::<RepeatElem>() {
start_artifact(gc, loc, ArtifactKind::Other);
return;
}
let tag: Tag = if let Some(pdf_tag) = elem.to_packed::<PdfTagElem>() {