Module:Template link general: Difference between revisions
Jump to navigation
Jump to search
Module:Template link general (view source)
Revision as of 12:27, 28 November 2021
, 28 November 2021Created page with "-- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= ""..."
imported>Hb1290 m (1 revision imported from wikipedia:Module:Template_link_general) |
imported>Jeffersonkendric (Created page with "-- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= ""...") |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 101: | Line 101: | ||
local i = 2 | local i = 2 | ||
while args[i] do | while args[i] do | ||
local val = | local val = args[i] | ||
textPartBuffer = textPartBuffer .. '|' | textPartBuffer = textPartBuffer .. '|' | ||
if val ~= "" then | if val ~= "" then | ||
if _ne(args.nowiki) then val = nw(val) end | if _ne(args.nowiki) then | ||
-- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will | |||
-- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up | |||
val = nw(mw.text.unstripNoWiki(val)) | |||
end | |||
if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end | if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end | ||
textPart = textPart .. textPartBuffer .. val | textPart = textPart .. textPartBuffer .. val | ||