Content deleted Content added
m Archiving 1 discussion(s) from Module talk:WikidataIB) (bot |
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB) |
||
Line 8:
Since the function already references [[Module:URL]], a much better way to do it would be to just reuse what the Module exports. The block starting with {{code|p.url2}} should be rewritten as:
<
local fmt_url = require([[Module:URL]])._url -- put this near the top
Line 28:
return fmt_url(url or txt) .. (icon and ' ' .. icon or "")
end
</
:
: The module doesn't currently reference [[Module:URL]] and it's preferable to reduce the number of external dependencies, rather than increase them unnecessarily. One of the issues with using {{tl|URL}} which prompted the fork to {{tl|URL2}} was that passing a blank url causes an error message by default in URL, but not in URL2:
|