Module:qualifier: difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Surjection (talk | contribs) qualifier_t moved to Module:qualifier/templates, other three no longer used |
Surjection (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local export = {} |
local export = {} |
||
function export.format_qualifier(list) |
function export.format_qualifier(list) -- keep in sync with [[Template:qualifier]] |
||
if type(list) ~= "table" then |
if type(list) ~= "table" then |
||
list = { list } |
list = { list } |
||
Line 16: | Line 16: | ||
end |
end |
||
function export.sense(list) |
function export.sense(list) -- keep in sync with [[Template:sense]] |
||
return export.format_qualifier(list) |
return export.format_qualifier(list) |
||
.. '<span class="ib-colon sense-qualifier-colon">:</span>' |
.. '<span class="ib-colon sense-qualifier-colon">:</span>' |
Revision as of 19:23, 25 January 2022
- The following documentation is located at Module:qualifier/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
A module for formatting lists of qualifiers ({{qualifier}}
, {{sense}}
, {{antsense}}
).
local export = {}
function export.format_qualifier(list) -- keep in sync with [[Template:qualifier]]
if type(list) ~= "table" then
list = { list }
end
if #list == 0 then
return ''
end
return '<span class="ib-brac qualifier-brac">(</span>' ..
'<span class="ib-content qualifier-content">' ..
table.concat(list, '<span class="ib-comma qualifier-comma">,</span> ') ..
'</span><span class="ib-brac qualifier-brac">)</span>'
end
function export.sense(list) -- keep in sync with [[Template:sense]]
return export.format_qualifier(list)
.. '<span class="ib-colon sense-qualifier-colon">:</span>'
end
return export