Content deleted Content added
No edit summary |
Thank you for the insights! |
||
Line 22:
I will upload my changes to the sandbox for test.--[[User:Moroboshi|Moroboshi]] ([[User talk:Moroboshi|talk]]) 11:14, 22 July 2013 (UTC)
:Thank you for the interest and the good advice! This is not only my first attempt with Lua programming, it is also my most serious attempt to program anything out of HTML/CSS. For instance, I wasn't aware that by not declaring variables explicitly local the module would pullute the global namespace (something that sounds obvious now that you say it).
: Your approach in 2) is definitely smarter and I'm happy to take it after testing that there are no side effects (I don't see why there should be any).
: <code>if territory.args[2] ~= "{{{2}}}" then</code> is the way I found to check whether a parameter for variants i.e. "1945" has been defined, after [[mw:Extension_talk:Scribunto#x.27Equal.27_character_used_in_template_parameter_messes_things:_bug_or_feature.3F__28646|asking at mediawiki.org]]. Improvements welcome.
|