Repository navigation
fix(oxvg_optimiser): honour applyTransformsStroked - #294
Merged
Merged
Conversation
The check in `apply_stroked` was inverted: with `applyTransformsStroked: false` transforms were still applied to stroked paths, and with `true` they were skipped. Because the option defaulted to `false`, the default output happened to match SVGO (whose default is `true`), but any explicit setting, including SVGO configs converted by `convertSvgoConfig`, did the opposite of what was asked. Negate the check and default the option to `true`, as in SVGO, so the default output is unchanged; explicit settings now do what they say, which reverses their effect for anyone who set them before. The docs, including the TypeScript definitions, are updated to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahbald
reviewed
Sep 28, 2026
noahbald
reviewed
Sep 28, 2026
…nfig defaults Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Description
The check in
apply_strokedis inverted:applyTransformsStroked: falsestill applies transforms to stroked paths, andtrueskips them. This negates the check and makestruethe default, as in SVGO. The default output stays the same; explicit settings now do what they say, which reverses them for existing configs. Docs and the checked-in.d.tscomments are updated to match.Motivation and Context
convertSvgoConfigpasses SVGO'sapplyTransformsStroked: truethrough, which currently turns the feature off.How Has This Been Tested?
New snapshot test for both settings; all
oxvg_optimisertests pass and existing snapshots are unchanged.Types of changes
Fixes
applyTransforms: honourapplyTransformsStrokedChecklist:
🤖 Generated with Claude Code