Module:Hatnote: Difference between revisions
Jump to navigation
Jump to search
Undid revision 609825678 by SMcCandlish (talk) this change will have quite far-reaching consequences, so should be discussed first
>SMcCandlish (Adding ability to handle "inline" parameter; sandboxed this at Module:Hatnote/sandbox-inline and with Template:Hatnote-inline. I have big plans for this.) |
>Mr. Stradivarius (Undid revision 609825678 by SMcCandlish (talk) this change will have quite far-reaching consequences, so should be discussed first) |
||
Line 184: | Line 184: | ||
options.extraclasses = args.extraclasses | options.extraclasses = args.extraclasses | ||
options.selfref = args.selfref | options.selfref = args.selfref | ||
return p._hatnote(s, options) | return p._hatnote(s, options) | ||
end | end | ||
Line 194: | Line 193: | ||
local extraclasses = options.extraclasses | local extraclasses = options.extraclasses | ||
local selfref = options.selfref | local selfref = options.selfref | ||
if type(extraclasses) == 'string' then | if type(extraclasses) == 'string' then | ||
classes[#classes + 1] = extraclasses | classes[#classes + 1] = extraclasses | ||
Line 201: | Line 199: | ||
classes[#classes + 1] = 'selfref' | classes[#classes + 1] = 'selfref' | ||
end | end | ||
return string.format( | |||
'<div class="%s">%s</div>', | |||
table.concat(classes, ' '), | |||
s | |||
) | |||
end | end | ||
return p | return p |