Module:Infobox: Difference between revisions
Appearance
add per https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481 see "two plain list" testcase |
m the three other types of lists as well |
||
Line 49: | Line 49: | ||
end | end | ||
end | end | ||
-- the next two lines add a newline at the end of | -- 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 | ||
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') | ||
return s | return s | ||
else | else |