Module:Infobox: Difference between revisions
From The Kodiak Republic Wiki
Content added Content deleted
m (the three other types of lists as well) |
(avoid "no data" tracking category when "child=yes" (see Template_talk:Infobox#Decat_by_default_when_child=yes?)) |
||
Line 2: | Line 2: | ||
-- This module implements {{Infobox}} |
-- This module implements {{Infobox}} |
||
-- |
-- |
||
local p = {} |
local p = {} |
||
Line 51: | Line 51: | ||
-- the next two lines add a newline at the end of lists for the PHP parser |
-- the next two lines add a newline at the end of lists for the PHP parser |
||
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 |
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 |
||
-- remove when [[:phab:T191516]] is fixed or OBE |
|||
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') |
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') |
||
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') |
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') |
||
Line 267: | Line 268: | ||
local function renderTrackingCategories() |
local function renderTrackingCategories() |
||
if args.decat ~= 'yes' then |
if args.decat ~= 'yes' then |
||
⚫ | |||
⚫ | |||
if args.title then |
|||
⚫ | |||
⚫ | |||
⚫ | |||
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]') |
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]') |
||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
end |
end |