mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
feat: mark RepeatElem as artifact
This commit is contained in:
parent
612aa8fc53
commit
6717a18414
@ -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.
|
||||
|
@ -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>() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user