模組:Chembox CASNo
外观
local p,lib_arg ={},{}
function p._print_chembox(frame)
-- For calling from #invoke.
local args, working_frame
if frame == mw.getCurrentFrame() then
-- We're being called via #invoke. The args are passed through to the module
-- from the template page, so use the args that were passed into the template.
if lib_arg.getArgs == nil then lib_arg = require('Module:Arguments') end
args = lib_arg.getArgs(frame) --frame.args
else
-- We're being called from another module or from the debug console, so assume
-- the args are passed in directly.
args = frame
end
working_frame = mw.getCurrentFrame()
return frame:preprocess('{{Chembox CASNo|value={{#if:{{{CASNo|}}}{{{CAS號|}}}{{{CAS号|}}}|{{{CASNo|{{{CAS號|{{{CAS号|}}}}}}}}} }} }}')
end
return p