Skip to content

fix: image rendering#2796

Open
VladaHarbour wants to merge 2 commits intomainfrom
sd-60_fix-image-handling
Open

fix: image rendering#2796
VladaHarbour wants to merge 2 commits intomainfrom
sd-60_fix-image-handling

Conversation

@VladaHarbour
Copy link
Copy Markdown
Contributor

No description provided.

@VladaHarbour VladaHarbour self-assigned this Apr 13, 2026
@linear
Copy link
Copy Markdown

linear bot commented Apr 13, 2026

@github-actions
Copy link
Copy Markdown
Contributor

Status: PASS

The key change β€” switching from .some() to .every() in the mc:Choice selection logic β€” is exactly what ECMA-376 Part 3 Β§10.2.2 requires:

"If the markup consumer does not understand all of the namespaces identified, it shall not select that Choice element. Markup consumers shall select the first Choice element, in markup order, in which all namespaces identified by the Requires attribute are understood."

The old .some() behavior was actually a spec violation: it would select a mc:Choice if even one of its required namespaces was supported, but the spec mandates every listed namespace must be understood before that choice can be selected. The PR corrects this.

The updated tests reflect the spec correctly:

  • A choice with Requires="wps w14" (both understood) β†’ selected. βœ“
  • A choice with Requires="wps unknownNs" (one unknown) β†’ falls through to mc:Fallback. βœ“

The utilities.ts/utilities.test.ts hunks in this diff are media path normalization changes unrelated to OOXML element semantics β€” nothing to flag there from a spec compliance angle.

For reference: https://ooxml.dev/spec?q=mc:Choice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant