summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorTobias Schmitz <tobiasschmitz2001@gmail.com>2025-06-25 17:46:36 +0200
committerTobias Schmitz <tobiasschmitz2001@gmail.com>2025-07-03 18:42:54 +0200
commit6717a184149e7a0af83fc3c5eda53d6a73308ea1 (patch)
treedb1991f3043c1d58d81250ba87eff7028fe8e652 /crates
parent612aa8fc5375c77e671ceb99e5809833f38968f0 (diff)
feat: mark RepeatElem as artifact
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-library/src/layout/repeat.rs1
-rw-r--r--crates/typst-pdf/src/tags.rs4
2 files changed, 4 insertions, 1 deletions
diff --git a/crates/typst-library/src/layout/repeat.rs b/crates/typst-library/src/layout/repeat.rs
index ffc149bb..ab042ceb 100644
--- a/crates/typst-library/src/layout/repeat.rs
+++ b/crates/typst-library/src/layout/repeat.rs
@@ -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.
diff --git a/crates/typst-pdf/src/tags.rs b/crates/typst-pdf/src/tags.rs
index 713163bb..4795edef 100644
--- a/crates/typst-pdf/src/tags.rs
+++ b/crates/typst-pdf/src/tags.rs
@@ -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>() {