autopatrol, curators, Interface administrators, Administrators
28,960
edits
PhantomCaleb (talk | contribs) (Prevent duplicate refs as seen in the Simplified Chinese name of Bomb, as reported by JumbledLimes on Discord earlier today) |
(Previous bugfix for multiple usages was causing script errors if a term was used; using supplied term as a workaround so that module now works if used multiple times (unless multiple usages use the same term but that shouldn't happen)) |
||
Line 152: | Line 152: | ||
local frame = mw.getCurrentFrame() | local frame = mw.getCurrentFrame() | ||
if frame:getParent().args[1] then | if frame:getParent().args[1] then | ||
-- | -- workaround if Nomenclature is used multiple times per page | ||
return | local subject = frame.args["term"] | ||
return frame:extensionTag({ | |||
name = "ref", | |||
args = { name = refNamePrefix..subject..'-'..citationIndex }, | |||
content = refContent, | |||
}) | |||
end | end | ||
return frame:extensionTag({ | return frame:extensionTag({ |