🩹 Compact fix for color generation in theme.json (#3222)
* Fix for incorrect theme.json generation of colours * Fix for theme.json color generation * Compact fix for colour theme.json generation --------- Co-authored-by: Steve Jones <steve@codewithfeeling.com>
This commit is contained in:
@@ -210,7 +210,8 @@ export function wordpressThemeJson({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rootContent = themeContent.slice(themeContent.indexOf('{') + 1, themeContent.lastIndexOf('}'))
|
const endIndex = themeContent.lastIndexOf('}');
|
||||||
|
const rootContent = themeContent.slice(themeContent.indexOf('{') + 1, endIndex === -1 ? undefined : endIndex);
|
||||||
const colorVariables = {}
|
const colorVariables = {}
|
||||||
|
|
||||||
const colorVarRegex = /--color-([^:]+):\s*([^;}]+)[;}]?/g
|
const colorVarRegex = /--color-([^:]+):\s*([^;}]+)[;}]?/g
|
||||||
|
|||||||
Reference in New Issue
Block a user