Skip to content

Commit

Permalink
fix: remove unwanted doctypes from svg sprite (#229)
Browse files Browse the repository at this point in the history
# Changes

- Adds an icon that is known to have a doctype definition in it
- Adds the flag to strip doctype in svg-sprite


# How to test

1. Run `npm run build && npm run lint` to see no errors regarding
`doctype`
2. Verify that there is only one `doctype` in any html file.
3. Verify that there was a `doctype` in the `close.svg` file.

# Checklist

- [X] I have performed a self-review of my own code
- [X] I have made sure that my PR is easy to review (not too big,
includes comments)
- [ ] ~I have made updated relevant documentation files (in project
README, docs/, etc)~
- [ ] ~I have added a decision log entry if the change affects the
architecture or changes a significant technology~
- [X] I have notified a reviewer

<!-- Please strike through and check off all items that do not apply
(rather than removing them) -->
  • Loading branch information
jurgenbelien authored Dec 18, 2024
1 parent 56b0648 commit 448f754
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"prep:download-redirects": "jiti scripts/download-redirects.ts",
"prep:download-site-data": "jiti scripts/download-site-data.ts",
"prep:download-translations": "jiti scripts/download-translations.ts",
"prep:icons": "svg-sprite --symbol --symbol-dest='src/assets' --symbol-sprite=icon-sprite.svg src/assets/icons/*.svg && jiti scripts/icon-types.ts",
"prep:icons": "svg-sprite --svg-doctype=false --symbol --symbol-dest='src/assets' --symbol-sprite=icon-sprite.svg src/assets/icons/*.svg && jiti scripts/icon-types.ts",
"preview": "wrangler pages dev ./dist",
"lint": "run-s lint:* --print-label",
"lint:astro": "astro check",
Expand Down
1 change: 1 addition & 0 deletions src/assets/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 448f754

Please sign in to comment.