Skip to content

Conversation

@caio-pizzol
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Jan 31, 2026

@github-actions
Copy link
Contributor

Based on my analysis of the code and knowledge of the ECMA-376 specification, I'll now provide a review:


Status: PASS

This PR implements formatting improvements and adds support for routing tableHeader nodes through the same translator as tableCell nodes. The OOXML handlers are spec-compliant.

Analysis

Changes Reviewed

  1. tr-translator.js (line 24-26): Valid w:tr attributes

    • w:rsidDel, w:rsidR, w:rsidRPr, w:rsidTr - These are valid revision ID attributes per ECMA-376 §17.13.5
    • w14:paraId, w14:textId - Valid Office 2010 extended attributes per ECMA-376 Part 4
  2. tableHeader routing (exporter.js): Both tableHeader and tableCell map to w:tc

    • This is correct - OOXML has no separate element for header cells
    • Headers are typically distinguished via styling/conditional formatting, not element type
    • See w:tc specification
  3. tr-helpers.js (line 85-103): Placeholder cell detection logic

    • Code formatting improvements only (added braces for clarity)
    • Logic is unchanged and doesn't affect OOXML output
  4. gridBefore/gridAfter handling:

    • Correctly uses w:gridBefore and w:gridAfter from w:trPr per ECMA-376 §17.4.14-15
    • These elements indicate blank grid columns before/after cells in a row
    • Implementation correctly strips placeholder cells during export (decode function)

Spec Compliance Notes

  • All XML attributes declared in validXmlAttributes exist in ECMA-376
  • The handlers correctly process w:trPr (table row properties) per §17.4.82
  • No required attributes are missing (w:tr has no required attributes)
  • Default value handling follows spec conventions

The implementation demonstrates proper understanding of OOXML table structure where header semantics are handled through styling rather than distinct element types.

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.

2 participants