Module:Unicode chart/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 39:
end
 
local function createTableHeadcreateTableHeader(head, name, url)
local name = "'''[[" .. name .. "]]'''"
local pdfLink = "[" .. url .. " Official Unicode Consortium code chart] (PDF)"
Line 48:
end
 
local function createTablecreateTableFooter(namefoot, url, blockRangeStart, blockRangeEndlatest)
local th = foot:tag("th")
:attr("colspan", "100%")
:wikitext("'''Notes'''")
local list = th:tag("ol")
list:tag("li"):wikitext("{{note|U0370_as_of_Unicode_version}}{{Unicode version|prefix=Asof|version=15.1}}")
list:tag("li"):wikitext("{{note|U0370_grey}}Grey areas indicate non-assigned code points")
end
 
local function createTable(name, url, blockRangeStart, blockRangeEnd, latestChange)
local tableHTML = mw.html.create("table")
:addClass("wikitable")
Line 55 ⟶ 64:
if name and url then
local head = tableHTML:tag("thead")
createTableHeadcreateTableHeader(head, name, url)
end
 
Line 61 ⟶ 70:
local body = tableHTML:tag("tbody")
createTableBody(body, blockRangeStart, blockRangeEnd)
end
if latestChange then
local foot = tableHTML:tag("tfoot")
createTableFooter(foot, latestChange)
end
return tostring(tableHTML)
Line 74 ⟶ 88:
args['url'],
args['rangestart'],
args['rangeend']),
args['latest change'])
)
end