-
Notifications
You must be signed in to change notification settings - Fork 61
refactor: remove redundant parameters in pm-adapter (SD-1587) #1823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove redundant parameters in pm-adapter (SD-1587) #1823
Conversation
I ran a bunch of tests in Word and the behavior we were implementing was wrong. The properties from the Normal style are always after the document's defaults, regardless of the value of w:default for the Normal style. Also, the properties from the Normal style are only added to the chain if the element does not have a linked style assigned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aaed6b64de
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
harbournick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* refactor: remove unused styleContext parameter * fix: extract default font and size from docDefaults * fix: adjust default font and size to match word * fix: ordering of document defaults and normal style I ran a bunch of tests in Word and the behavior we were implementing was wrong. The properties from the Normal style are always after the document's defaults, regardless of the value of w:default for the Normal style. Also, the properties from the Normal style are only added to the chain if the element does not have a linked style assigned. * test: fix existing tests * chore: remove unused imports * fix: interpret default font size as pixels instead of points --------- Co-authored-by: Luccas Correa <luccas@superdoc.dev>
# [1.9.0-next.2](v1.9.0-next.1...v1.9.0-next.2) (2026-01-24) ### Bug Fixes * remove redundant parameters in pm-adapter (SD-1587) ([#1823](#1823)) ([e315ad4](e315ad4))
styleContextparameter which was not being used. The converters get the numbering definitions and linked styles from theconverterContextso this parameter was not needed.docDefaultsif the document doesn't define them.defaultFontanddefaultSizeparameters that were passed to the converters were removed.docDefaultsand theNormalstyle's props fit into the style resolution chain was fixed so that it matches Word's behavior