fix: accept explicit no-underline stylesheet fonts - #207
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow stylesheet fonts containing
<u val="none"/>to load and round-trip instead of throwingOpenXmlSchemaError. Keep the explicit value in cell and differential fonts, and render it as no underline infontToCss.Motivation
Closes #206.
FontSchemausesUNDERLINE_STYLESto validate XML, but that list omittednone, a validST_UnderlineValuesmember in the vendored SpreadsheetML XSD and Microsoft's reference. Both workbook loaders therefore rejected the report described in the issue. A synthetic XLSX reproduces the same exception without needing the reporter's private data.Changes
nonein the existingUnderlineStylemodel and font schema. Keeping it distinct from an absent field also preserves explicit overrides in differential styles.text-decoration: nonefor explicit no-underline fonts, while retaining strike-through when set.Testing
pnpm vitest run tests/styles/issue-206.test.ts: 13 cases cover all valid underline values, bare/absent elements, invalid values, CSS, regular and streaming loading, editing, and save/reload. Four cases failed with the reported exception before the fix.check:attw, andcheck:consumerpassed.PERF_GATE=1 pnpm test:perfpassed.Breaking changes
None. Previously accepted values and the bare
<u/>default retain their behavior.Checklist
pnpm changesetand committedthe result.
marked accordingly.
comments.
PR represents real work that warrants a maintainer's review, and I am
willing to defend each line in review.