Fix text margin arrays to use documented TRBL order - #1475
Open
guiwoda wants to merge 4 commits into
Open
Conversation
textObjectToXml was still mapping margin as LRBT (lIns←[0], tIns←[3]), so left padding became a top inset and could overflow tightly sized bullet boxes. Co-authored-by: Cursor <cursoragent@cursor.com>
Leave running the regression via `node --test` without adding a new npm script. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Dropped the node --test test/*.test.mjs |
Per project guidelines, contributors should only change source; maintainers rebuild dist. Co-authored-by: Cursor <cursoragent@cursor.com>
Match project testing (demos/modules + TESTING.md): add an asymmetric text-margin case and annotate the existing left-margin bullet example. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Updated testing to match TESTING.md / the PR template:
Verify with the Text demos after |
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
marginarrays are documented as TRBL[top, right, bottom, left], and table/slide-number margins already map that way, buttextObjectToXmlstill used the old LRBT mapping (lIns ← margin[0],tIns ← margin[3]).padding-left(e.g. hanging-indent bullet lists viadom-to-pptx) can then overflow a box whose height was measured without that inset.Test plan
Per TESTING.md:
npm run shipmargin:[5,5,5,40]box shows a large left inset (not top)margin:[0,0,0,10]has left padding only