Skip to content

Fix disabled run formatting values#2

Open
Bruce-anle wants to merge 1 commit into
sudipnext:mainfrom
Bruce-anle:fix/run-formatting-onoff
Open

Fix disabled run formatting values#2
Bruce-anle wants to merge 1 commit into
sudipnext:mainfrom
Bruce-anle:fix/run-formatting-onoff

Conversation

@Bruce-anle
Copy link
Copy Markdown

Summary

  • respect OpenXML CT_OnOff semantics for w:b, w:i, and w:strike
  • treat missing w:val as enabled, but explicit 0/false/off as disabled
  • add markdown converter tests for enabled and disabled bold, italic, and strikethrough values

Why

DOCX run formatting properties can explicitly disable formatting with w:val="0", "false", or "off". The previous converter treated the element's presence as enabled and emitted incorrect markdown formatting.

Tests

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

Background: OpenXML CT_OnOff treats missing w:val as enabled, but explicit 0/false/off as disabled. The markdown converter previously treated w:b, w:i, and w:strike elements as enabled whenever present.\n\nChanges: add CT_OnOff helper for run formatting and tests for enabled and disabled bold, italic, and strikethrough values.\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