Skip to content

Fix run break order and manual page breaks#3

Open
Bruce-anle wants to merge 1 commit into
sudipnext:mainfrom
Bruce-anle:fix/manual-page-break
Open

Fix run break order and manual page breaks#3
Bruce-anle wants to merge 1 commit into
sudipnext:mainfrom
Bruce-anle:fix/manual-page-break

Conversation

@Bruce-anle
Copy link
Copy Markdown

Summary

  • parse run child elements in document order
  • keep regular w:br values as newlines
  • emit for w:br w:type="page"
  • add focused markdown converter tests for page, regular, and text-wrapping breaks

Why

The previous converter gathered all text first and appended all breaks afterward. This misplaced regular line breaks and made manual page breaks impossible to render at the correct position.

Tests

  • /home/brucean/doc4agent/.venv/bin/python -m pytest tests -q -p no:cacheprovider

Background: w:br elements are part of run content order. The converter previously collected all text first and appended breaks afterward, so normal breaks were misplaced and w:br w:type=page could not be represented correctly.\n\nChanges: parse run children in document order and emit <!-- Page Break --> for manual page breaks while keeping regular breaks as newlines.\n\nVerification: /home/brucean/doc4agent/.venv/bin/python -m pytest tests -q -p no:cacheprovider passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant