Module:Subatomic particle explained

local p =

local particles =

--- Public function which is used to return a particle's symbol,--- with or without a link to its article.------ Parameters:--- |1= — The particle's name.--- |link= — optional; Set if the particle should link to its article.------ @param frame table The frame invoking the module.function p.main(frame) local getArgs = require("Module:Arguments").getArgs local args = getArgs(frame)

if not args[1] then return "" end

local requested_particle = string.lower(args[1]) local particle = particles[requested_particle]

if not particle then return "" end

local particle_args = particle.symbol if args.link then particle_args.link = particle.link end

return frame:expandTemplateend

return p