feat(07): close native text pagination semantics loop

This commit is contained in:
shen
2026-05-22 20:39:26 +08:00
parent 21c8bbb23a
commit d7339aa255
15 changed files with 722 additions and 22 deletions
@@ -33,6 +33,9 @@ public final class RDPlainTextBookBuilder {
blockRange: nil,
attachmentRanges: [],
attachmentKinds: [],
blockKinds: [],
semanticHints: [],
attachmentPlacements: [],
trailingFragmentID: nil,
diagnostics: [
"page break: chapterEnd",
@@ -69,7 +72,7 @@ public final class RDPlainTextBookBuilder {
title: spec.title ?? "\(index + 1)",
attributedContent: content.copy() as! NSAttributedString,
fragmentOffsets: [:],
pageBreakReasons: pages.map(\.metadata.breakReason),
pageBreakReasons: pages.map { $0.metadata.breakReason },
pages: pages
)
)