From eafc04a2e122d503360fb80c13626e23d212bb1f Mon Sep 17 00:00:00 2001 From: aiongg Date: Sat, 14 Nov 2026 05:18:34 +0000 Subject: [PATCH] IDML export: placements in cells and footnotes embed their PDF layer choices (cherry picked from commit c017ca777c50edc0da018aaded9cb58d6ec4f456) --- crates/idml/src/xml.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/idml/src/xml.rs b/crates/idml/src/xml.rs index 8926062ec..d09df0400 100644 --- a/crates/idml/src/xml.rs +++ b/crates/idml/src/xml.rs @@ -236,7 +236,9 @@ pub(crate) fn from_craft(el: craft_xml::El) -> El { .filter_map(|n| match n { craft_xml::Node::El(e) => Some(Node::El(from_craft(e))), craft_xml::Node::Text(t) => Some(Node::Text(t)), - craft_xml::Node::CData(t) => Some(Node::Text(t)), + // The parser joins CDATA to the text around it, so only trees built for export + // (`` image data passed through `with_props`) carry sections here. + craft_xml::Node::CData(t) => Some(Node::CData(t)), craft_xml::Node::Pi { target, data } => Some(Node::Pi(target, data.trim().to_string())), craft_xml::Node::Comment(_) => None, })