Module:form of/functions: Difference between revisions

no edit summary
(Created page with "--[=[ DISPLAY_HANDLERS is a list of one or more functions that provide special handling for multipart tags. Each function takes formerly a single argument (the multipart tag),...")
 
No edit summary
 
Line 27: Line 27:


local function wrap_in_inflection_of_sep(text)
local function wrap_in_inflection_of_sep(text)
return '<span class="inflection-of-sep">' .. text .. '</span>'
return '<span>' .. text .. '</span>'
end
end
Line 42: Line 42:
return seq[1] .. wrap_in_inflection_of_sep("&#32;and&#32;") .. seq[2]
return seq[1] .. wrap_in_inflection_of_sep("&#32;and&#32;") .. seq[2]
else
else
local comma = '<span class="serial-comma">,</span>'
local comma = '<span>,</span>'
local conj = '<span class="serial-and">&#32;and&#32;</span>'
local conj = '<span>&#32;and&#32;</span>'
return table.concat(seq, wrap_in_inflection_of_sep(",&#32;"), 1, length - 1) ..
return table.concat(seq, wrap_in_inflection_of_sep(",&#32;"), 1, length - 1) ..
wrap_in_inflection_of_sep(comma .. conj) .. seq[length]
wrap_in_inflection_of_sep(comma .. conj) .. seq[length]
Line 72: Line 72:
error("Unrecognized multipart join strategy: " .. strategy)
error("Unrecognized multipart join strategy: " .. strategy)
end
end
return '<span class="inflection-of-conjoined">' .. retval .. '</span>'
return '<span>' .. retval .. '</span>'
end
end