ws-cleanup-types: archive, audio, data, font, image, layered, music, playlist, subtitle, vector, video: annotations, casts, one value per re-assignment where the solver loses the type
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b0d0a99fec
commit
9af7138b2e
44 files changed
+172
-119
No files matched your search
@@ -194,7 +194,7 @@ local function scan(s: string, i: number): (number?, number)
|
||||
end
|
||||
|
||||
-- length(s, ref?, fontSize?) -> number in user units | nil. ref: what 100% is (default 100)
|
||||
local UNITS = { px = 1, pt = 4 / 3, pc = 16, mm = 96 / 25.4, cm = 96 / 2.54, ["in"] = 96, q = 96 / 101.6 }
|
||||
local UNITS: { [string]: number } = { px = 1, pt = 4 / 3, pc = 16, mm = 96 / 25.4, cm = 96 / 2.54, ["in"] = 96, q = 96 / 101.6 }
|
||||
function Style.length(s: string?, ref: number?, fontSize: number?): number?
|
||||
if s == nil then
|
||||
return nil
|
||||
@@ -355,11 +355,11 @@ function Style.css(text: string, rules: { Rule }?): { Rule }
|
||||
if not s then
|
||||
break
|
||||
end
|
||||
text = string.sub(text, 1, s - 1) .. string.sub(text, e + 1)
|
||||
text = string.sub(text, 1, s - 1) .. string.sub(text, (e :: number) + 1)
|
||||
end
|
||||
text = string.gsub(text, "@[%w-]+[^;{]*;", "")
|
||||
for sels, body in string.gmatch(text, "([^{}]+)(%b{})") do
|
||||
local decls = Style.declarations(string.sub(body, 2, -2))
|
||||
local decls = Style.declarations(string.sub(body :: string, 2, -2))
|
||||
for one in string.gmatch(sels, "[^,]+") do
|
||||
local sel = selector(one)
|
||||
if sel then
|
||||
|
||||
Reference in new issue
Block a user