Skip to content

Commit

Permalink
fix(cleanupIds): properly handle begin regex to fix #1775 (#1862)
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow authored Nov 30, 2023
1 parent f0ec586 commit 5144936
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/cleanupIds.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports.description = 'removes unused IDs and minifies used';

const regReferencesUrl = /\burl\((["'])?#(.+?)\1\)/g;
const regReferencesHref = /^#(.+?)$/;
const regReferencesBegin = /(\D+)\./;
const regReferencesBegin = /(\w+)\.[a-zA-Z]/;
const generateIdChars = [
'a',
'b',
Expand Down
24 changes: 24 additions & 0 deletions test/plugins/cleanupIds.24.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 5144936

Please sign in to comment.