update regex to match variable google-font
This commit is contained in:
@@ -16,13 +16,13 @@ let fontPrimary, fontPrimaryType, fontSecondary, fontSecondaryType;
|
||||
if (theme.fonts.font_family.primary) {
|
||||
fontPrimary = theme.fonts.font_family.primary
|
||||
.replace(/\+/g, " ")
|
||||
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;]+/gi, "");
|
||||
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;.]+/gi, "");
|
||||
fontPrimaryType = theme.fonts.font_family.primary_type;
|
||||
}
|
||||
if (theme.fonts.font_family.secondary) {
|
||||
fontSecondary = theme.fonts.font_family.secondary
|
||||
.replace(/\+/g, " ")
|
||||
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;]+/gi, "");
|
||||
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;.]+/gi, "");
|
||||
fontSecondaryType = theme.fonts.font_family.secondary_type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user