Difference between revisions of "Module:SandboxShortCode"

From PKC
Jump to navigation Jump to search
 
Line 4: Line 4:
-- aString = "<h1>\\" .. mw.allToString(cf.args[1]) .. "</h1>"
-- aString = "<h1>\\" .. mw.allToString(cf.args[1]) .. "</h1>"
str = mw.getCurrentFrame().args[1]
str = mw.getCurrentFrame().args[1]
aString = cf:preprocess("<math>\\"..str.."</math>")
aString = cf:preprocess("firstStr"..str.."secondStr")
return aString
return aString
end
end

Latest revision as of 06:52, 11 January 2022

Documentation for this module may be created at Module:SandboxShortCode/doc

-- aString Some examples for punctuation:<, >, \\ // ' " .. ...
function p.greek_letter()
	cf = mw.getCurrentFrame()
	-- aString = "<h1>\\" .. mw.allToString(cf.args[1]) .. "</h1>"
	str = mw.getCurrentFrame().args[1]
	aString = cf:preprocess("firstStr"..str.."secondStr")
	return aString
end