Skip to content

Commit 5144936

Browse files
authored
fix(cleanupIds): properly handle begin regex to fix #1775 (#1862)
1 parent f0ec586 commit 5144936

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

plugins/cleanupIds.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports.description = 'removes unused IDs and minifies used';
1313

1414
const regReferencesUrl = /\burl\((["'])?#(.+?)\1\)/g;
1515
const regReferencesHref = /^#(.+?)$/;
16-
const regReferencesBegin = /(\D+)\./;
16+
const regReferencesBegin = /(\w+)\.[a-zA-Z]/;
1717
const generateIdChars = [
1818
'a',
1919
'b',

test/plugins/cleanupIds.24.svg

+24
Loading

0 commit comments

Comments
 (0)