Differenze tra le versioni di "Modulo:Sup"

309 byte aggiunti ,  03:00, 31 gen 2019
Adding _abbr proxy function to abbreviation modules *** sovrascritto il testo esistente ***
m (Annullata la modifica 644641 di F3Bot (discussione))
(Adding _abbr proxy function to abbreviation modules *** sovrascritto il testo esistente ***)
 
--[[
 
This module creates link to games, displaying them in superscripts with
with colored abbreviations.
 
Examples:
{{#invoke: Sup | HGSS | XY | ROZA }}
 
HINT: If you get an Errore Script, try to split an abbreviation into smaller
smaller parts. For example:
 
{{#invoke: Sup | OACPtHGSS }} --> {{#invoke: Sup | OAC | Pt | HGSS }}
 
However, this doesn't work if the first abbreviation is not constant, for
example if it's a parameter in a template. In that case, you can use the
_abbr function to pass all the abbreviations as parameters:
 
{{#invoke: Sup | _abbr | {{{1}}} }}
 
--]]
 
-- Dynamically generated Wikicode interface
returnlocal sup = lib.mapAbbrs(function(_, abbr)
 
--[[
return lib.onMergedAbbrs(abbr, makeLinks, makeSup)
end)
 
-- Adding _abbr proxy function
lib.proxy(sup)
 
return sup
106 621

contributi