refactor(generator): use fmt() for string.format() more (#34528)

This commit is contained in:
zeertzjq
2025-06-17 06:50:51 +08:00
committed by GitHub
parent 24bb110588
commit 5647b45e69
2 changed files with 10 additions and 10 deletions

View File

@@ -758,7 +758,7 @@ local function render_fun(fun, classes, cfg)
else
local v = assert(util.version_level[since], 'invalid @since on ' .. fun.name)
fun.attrs = fun.attrs or {}
table.insert(fun.attrs, ('Since: %s'):format(v))
table.insert(fun.attrs, fmt('Since: %s', v))
end
end
@@ -799,7 +799,7 @@ local function render_fun(fun, classes, cfg)
if fun.overloads then
table.insert(ret, '\n Overloads: ~\n')
for _, p in ipairs(fun.overloads) do
table.insert(ret, (' • `%s`\n'):format(p))
table.insert(ret, fmt(' • `%s`\n', p))
end
end