Skip to content

Commit

Permalink
Added CSS.escape to font-family.ts
Browse files Browse the repository at this point in the history
Added CSS.escape to renderHTML. Prevents invalid css when using fonts with numbers in their names, like https://fonts.google.com/specimen/Exo+2
  • Loading branch information
SanderLeenders authored and janthurau committed Nov 17, 2023
1 parent a383297 commit ddc78a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension-font-family/src/font-family.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const FontFamily = Extension.create<FontFamilyOptions>({
}

return {
style: `font-family: ${attributes.fontFamily}`,
style: `font-family: ${CSS.escape(attributes.fontFamily)}`,
}
},
},
Expand Down

0 comments on commit ddc78a6

Please sign in to comment.