Module:Hatnote inline: Difference between revisions

changing function name
m>SMcCandlish
(Saving modified code of Module:Hatnote. Haven't read f-all about Lua yet, flying on intuition. Not sure how to reuse �p.findNamespaceId, etc., from orig. module yet.)
 
m>SMcCandlish
(changing function name)
Line 103: Line 103:


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Hatnote-inline
-- HatnoteInline
--
--
-- Produces standard hatnote-inline text. Implements the {{hatnote-inline}} template.
-- Produces standard hatnote-inline text. Implements the {{hatnote-inline}} template.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


function p.hatnote(frame)
function p.hatnoteInline(frame)
local args = getArgs(frame)
local args = getArgs(frame)
local s = args[1]
local s = args[1]
Line 121: Line 121:
options.extraclasses = args.extraclasses
options.extraclasses = args.extraclasses
options.selfref = args.selfref
options.selfref = args.selfref
return p._hatnote(s, options)
return p._hatnoteInline(s, options)
end
end


function p._hatnote(s, options)
function p._hatnoteInline(s, options)
checkType('_hatnote', 1, s, 'string')
checkType('_hatnoteInline', 1, s, 'string')
checkType('_hatnote', 2, options, 'table', true)
checkType('_hatnoteInline', 2, options, 'table', true)
local classes = {'hatnote-inline'}
local classes = {'hatnote-inline'}
local extraclasses = options.extraclasses
local extraclasses = options.extraclasses
Anonymous user