Skip to content

fix: honor docDefaults direction cascade and preserve run-level w:rtl on export#3162

Closed
artem-harbour wants to merge 4 commits intomainfrom
artem/rtl-v3
Closed

fix: honor docDefaults direction cascade and preserve run-level w:rtl on export#3162
artem-harbour wants to merge 4 commits intomainfrom
artem/rtl-v3

Conversation

@artem-harbour
Copy link
Copy Markdown
Contributor

Additional RTL gaps.

  • Added docDefaults paragraph direction fallback in pm-adapter direction resolution (paragraph -> section -> docDefaults -> run inference -> LTR).
  • Fixed run-level RTL export preservation: runProperties.rtl is now retained in w:rPr export path even with inline/style key filtering.
  • Added coverage:
    • docDefaults precedence tests in paragraph direction logic.
    • w:rtl decode/export tests (rtl/rPr/r translators).
    • Footer roundtrip regression test proving <w:rtl/> survives import/export.
  • Result: closes two high-priority RTL gaps (template docDefaults direction and footer run-level RTL loss).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

The ecma-spec MCP tools aren't permitted yet. Could you approve the mcp__ecma-spec__ooxml_element (and related) tool calls? They're needed to look up the w:rtl and w:rPr element definitions against the ECMA-376 spec.

Once you grant permission, I can check:

  1. Whether w:rtl is a valid child of w:rPr
  2. What attributes w:rtl accepts (specifically whether w:val='0' is a valid suppression form)
  3. Whether the { attributes: {} } form (omitting w:val) is the correct way to express "RTL enabled"

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol self-assigned this May 5, 2026
@artem-harbour artem-harbour added the don't merge Don't merge yet label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants