1
0

css compiler fixes
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 6m54s
Build Docker and Deploy / Deploy to Server (push) Successful in 15s

This commit is contained in:
2026-02-08 00:20:39 +01:00
parent 3ebbd23d7a
commit e4872d19c0
4 changed files with 22 additions and 13 deletions

View File

@@ -149,7 +149,7 @@ for i in range(len(data)):
copen = findnext(data, i, '{')
cclose = findclose(data, copen)
if countnl(data, copen, cclose) == 0: continue;
if countnl(data, copen, cclose) == 0: continue
ins.append((copen + 1, '\n\t'))
for i2 in range(copen + 1, cclose):
@@ -162,6 +162,12 @@ for i in range(len(data)):
for (l, c) in reversed(ins):
data = data[:l] + c + data[l:]
print('======== MORE ========')
# fixes `calc(100%+5px)` stuff
data = re.compile(r"calc\(([^)]+)\)").sub(lambda m: "calc(" + re.sub(r"(?<=[^\s])([\+\-\*/])(?=[^\s])", " \\1 ", m.group(1)) + ")", data)
print('')
print('')