Skip to content

Commit

Permalink
fix: handle backslash in font-icons when generating CSS (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored and vaadin-bot committed Oct 18, 2024
1 parent ef2a1fe commit 449dfad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/css-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ function shimThemableMixin(moduleId: string) {
return shimModule(themableMixin, {
...themableMixinModule,
css(strings: readonly string[], ...values: ReadonlyArray<CSSResult | number>) {
return new CSSResult(moduleId, strings, values);
const result: readonly string[] = moduleId.endsWith('font-icons.js')
? strings.map((string) => string.replace(/'\\\\([a-z0-9]+)'/g, "'\\$1'"))
: strings;
return new CSSResult(moduleId, result, values);
},
registerStyles() {},
unsafeCSS,
Expand Down

0 comments on commit 449dfad

Please sign in to comment.