A modult a Modul:R:it:Treccani/doc lapon tudod dokumentálni
local export = {}
function export.create(frame)
local params = {
= {default = mw.title.getCurrentTitle().text},
= {},
= {},
= {},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local strippedTerm = mw.ustring.toNFD(args)
:gsub("", "") -- strip combining diacritical marks, U+0300-U+036F
:gsub(' ', '-')
local encodedTerm = mw.uri.encode(strippedTerm)
local sense = args or ''
if sense ~= '' then
encodedTerm = encodedTerm .. sense
end
local title = (args or args):gsub('_', ' ')
local link = "[https://www.treccani.it/vocabolario/" .. encodedTerm .. " " .. title
.. (sense and ('<sup>' .. sense .. '</sup>') or '')
.. "] " ..
"- ''Treccani''"
return link
end
return export