Expose typed IDML paragraph breaks

This commit is contained in:
Dylan M. Taylor committed 2026-11-13 09:05:19 -05:00
1 parent 3a53860a81
commit 9f57e1fc0e
1 file changed
+5
+5
View File
@@ -324,6 +324,11 @@ fn text(nodes: &[TextNode], ace: &dyn Fn(Ace) -> Option<char>) -> String {
}
impl Range {
/// `ParagraphBreakType`, except `Anywhere` which means no forced break.
pub fn paragraph_break_type(&self) -> Option<&str> {
self.values.get("ParagraphBreakType").filter(|kind| *kind != "Anywhere")
}
/// `AppliedParagraphStyle` of a paragraph range.
pub fn paragraph_style(&self) -> Option<&str> {
self.values.get("AppliedParagraphStyle")