Skip to content

Stop cleanupNumericValues from changing id attributes breaking refs#2220

Open
mattaw wants to merge 1 commit into
svg:mainfrom
mattaw:main
Open

Stop cleanupNumericValues from changing id attributes breaking refs#2220
mattaw wants to merge 1 commit into
svg:mainfrom
mattaw:main

Conversation

@mattaw

@mattaw mattaw commented May 6, 2026

Copy link
Copy Markdown

Unfortunately the plugin cleanupNumericValues was breaking .svg diagrams generated by wavedrom.com.

Wavedrom uses the id string "000" for one of its repeated elements (a waveform element for logic zero that started as zero, was zero, and finished as zero, hence "000"). cleanupNumericValues was treating id as a normal number, and truncating "000" to "0", breaking the diagram.

This PR adds attributes named id to the existing exclusion for version in cleanupNumericValues avoiding this problem. It passes yarn run qa, with a decent number of expected mismatches now listed as matching - maybe this fixed more than just my usecase? See attached terminal log
corepack_yarn_run_qa.log.

Original Diagram:
image

Broken after svgo default plugin run:
image

Fixed after patch:
image

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