Skip to content

Commit 0f77aaf

Browse files
committed
fix(src): fixed source svg inlined styles
1 parent cc72912 commit 0f77aaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+522
-72
lines changed

scripts/build.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ async function optimizeSvgs(srcSvgData: SvgData[]) {
9090
.replace('-outline', '')
9191
.replace('-sharp', '')
9292
.replace(/-/g, ' ');
93+
console.log(fileName)
9394
item.content[0].text = fileName;
9495
}
9596
return item;
@@ -126,10 +127,13 @@ async function optimizeSvgs(srcSvgData: SvgData[]) {
126127
if (item.isElem()) {
127128
item.eachAttr(attr => {
128129
if (attr.name === 'style') {
129-
throw new Error('Inline style detected');
130+
throw new Error('Inline style attributed detected');
130131
}
131132
});
132133
}
134+
if (item.isElem('style')) {
135+
throw new Error('Inline style element detected');
136+
}
133137
}
134138
}
135139
} as any

0 commit comments

Comments
 (0)