mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-20 17:25:24 +00:00
Expose typed IDML paragraph breaks
This commit is contained in:
1 file changed
+5
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user