Skip to content

Commit

Permalink
Merge pull request #32 from leaderli/main
Browse files Browse the repository at this point in the history
fix change color issue
  • Loading branch information
anncwb authored Dec 3, 2021
2 parents ea0615c + a990b69 commit fe09334
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ export async function compilerIcon(
const { data } = await optimize(content, svgOptions);
content = data;
}

// fix cannot change svg color by parent node problem
content = content.replace(/stroke="[a-zA-Z#0-9]*"/,'stroke="currentColor"')
const svgSymbol = await new SVGCompiler().addSymbol({
id: symbolId,
content,
Expand Down

0 comments on commit fe09334

Please sign in to comment.