Module:Indication : Différence entre versions

De Wikonsult
Sauter à la navigation Sauter à la recherche
w.fr>TomT0m
(argument index correction)
 
m (1 révision importée)
 
(Aucune différence)

Version actuelle datée du 24 février 2019 à 16:17

La documentation pour ce module peut être créée à Module:Indication/Documentation

p = {}

function p.genIndication(code, nom, classe_css)
	
	local html = mw.html.create( '' )
	
	html:tag( 'span' )
			:addClass( classe_css )
			:wikitext( '(' )
			:tag( 'abbr' )
				:addClass( 'abbr' )
				:attr( 'title', nom )
				:wikitext( code )
				:done()
			:wikitext( ')' )
			:done()
		:wikitext( texte )
		
	return tostring(html)
end

function p.indication(frame)
	return p.genIndication(frame.args[1], frame.args[2], frame.args[3])
end

return p