Skip to content

fix: preserve text decoration in text style resources - #371

Open
han4wluc wants to merge 1 commit into
mainfrom
fix/text-style-underline
Open

han4wluc wants to merge 1 commit into
mainfrom
fix/text-style-underline

Conversation

@han4wluc

Copy link
Copy Markdown
Contributor

Text style resources reject textDecoration, and the text style resolver drops it, so an author cannot underline text through a shared text style, and tools that export formatted text have to drop underline.

Reproduce: a resources.textStyles entry with textDecoration: "underline" fails schema validation, and the rendered text style of an element or rich text run using that style has no decoration (regression tests).

Fix: text style resources accept an optional textDecoration (none or underline); the resolver passes it into the rendered text style; the validator is regenerated.

Tests: schema acceptance and rejection of unknown values, and render states for plain text, rich text runs referencing the style, and text-revealing. The full suite (2,165 tests), lint, the test-marker check and changed-file formatting pass.

Note: drawing the underline also needs Route Graphics' underline rendering (RouteVN/route-graphics#362); this change makes the engine emit the decoration.

This branch has not been deployed

No deployments
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