Commit be052f5
Fix SplitOnSections to properly handle body-level w:sectPr as section boundary
Previously, body-level w:sectPr elements were incorrectly included as
block-level content when computing section ranges. This caused the final
section's headers/footers/page settings to be merged into the previous
section when the last section was defined only by body-level section
properties.
The fix filters out w:sectPr elements from the body's child elements
before processing, since they are section properties rather than
block-level content. This ensures proper section boundary detection and
prevents sectPr elements from being counted in element ranges.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 5bd381a commit be052f5
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
249 | 255 | | |
250 | 256 | | |
251 | 257 | | |
| |||
0 commit comments