Module:Hatnote inline: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
changing to inline version with span
(starting with fresh copy of code from Module:Hatnote)
(changing to inline version with span)
Line 1:
--------------------------------------------------------------------------------
-- Module:Hatnote -inline --
-- --
-- This module produces inline hatnote links and links to related articles(i.e. It cross-reference) notes and links --
-- to related articles. It implements the {{hatnote}} and {{format hatnote link-inline}} meta-templates, and --
-- and includes helper functions for other Lua hatnote modules. (for now) --
--------------------------------------------------------------------------------
 
Line 166:
 
--------------------------------------------------------------------------------
-- HatnoteInline
-- Hatnote
--
-- Produces standard inline hatnote text. Implements the {{hatnote}} template.
-- Implements the {{hatnote-inline}} template.
--------------------------------------------------------------------------------
 
function p.hatnotehatnoteInline(frame)
local args = getArgs(frame)
local s = args[1]
Line 178 ⟶ 179:
return p.makeWikitextError(
'no text specified',
'Template:Hatnote-inline#Errors',
args.category
)
Line 184 ⟶ 185:
options.extraclasses = args.extraclasses
options.selfref = args.selfref
return p._hatnote_hatnoteInline(s, options)
end
 
function p._hatnote_hatnoteInline(s, options)
checkType('_hatnote_hatnoteInline', 1, s, 'string')
checkType('_hatnote_hatnoteInline', 2, options, 'table', true)
local classes = {'hatnote-inline'}
local extraclasses = options.extraclasses
local selfref = options.selfref
Line 200 ⟶ 201:
end
return string.format(
'<divspan class="%s">%s</divspan>',
table.concat(classes, ' '),
s
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu