mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 20:30:20 -06:00
[PATCH] Upstream patch - 26022023
This commit is contained in:
1 parent
7d8de9bd7f
commit
cd6b5bbd2a
22 files changed
+178
-83
No files matched your search
@@ -114,6 +114,13 @@ class Assets(models.AbstractModel):
|
||||
updatedFileContent = self.get_asset_content(custom_url) or self.get_asset_content(url)
|
||||
updatedFileContent = updatedFileContent.decode('utf-8')
|
||||
for name, value in values.items():
|
||||
# Protect variable names so they cannot be computed as numbers
|
||||
# on SCSS compilation (e.g. var(--700) => var(700)).
|
||||
if isinstance(value, str):
|
||||
value = re.sub(
|
||||
r"var\(--([0-9]+)\)",
|
||||
lambda matchobj: "var(--#{" + matchobj.group(1) + "})",
|
||||
value)
|
||||
pattern = "'%s': %%s,\n" % name
|
||||
regex = re.compile(pattern % ".+")
|
||||
replacement = pattern % value
|
||||
|
||||
Reference in new issue
Block a user