Skip to content

Add Word horizontal rules to paragraphs - #1621

Draft
pseudosavant wants to merge 1 commit into
python-openxml:masterfrom
pseudosavant:codex/horizontal-rule-upstream
Draft

pseudosavant wants to merge 1 commit into
python-openxml:masterfrom
pseudosavant:codex/horizontal-rule-upstream

Conversation

@pseudosavant

Copy link
Copy Markdown

Summary

Add Paragraph.add_horizontal_rule() for Word's built-in horizontal-line representation. Calling it on an empty paragraph applies a bottom paragraph border with a simple line. It preserves existing paragraph properties and is idempotent.

Microsoft documents that Word's three-character horizontal-line shortcut creates an empty paragraph with a bottom border: https://support.microsoft.com/en-us/word/insert-a-horizontal-line

Validation

  • Two saved-document tests pass against upstream master. They check the serialized border and preserved paragraph properties.
  • Ruff checks pass for all changed files.
  • The fork's full test suite passed with 1,839 tests before its 1.3.10 release.

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