--Simplify reference markup | Temp test at User:Dovid/sandbox/test | Used by template User:Dovid/sandbox/Ezreflocal ez =, paramlistlocal notes, opsLeft, opsRight, dbgLeft, dbgRight = "", "<", ">", "?", "!"local tagLeft, tagRight = opsLeft, opsRight -- dbgLeft, dbgRight
function errNoName(suffix) suffix = (suffix or ) -- .. (notes
function ez.ref(frame) -- local args=frame.getParent(frame).args if not frame then return errNoName('f') end local parent = frame.getParent(frame) if not parent then return errNoName('p') end local args = frame.args paramlist = args --global, for debugging if not args then return errNoName('a') end local refname = args['name'] or args[1] if not refname then return errNoName('n') end -- notes = '1=' .. (frame.args[1] ? frame.args[1] ? 'nil') .. '; name=' .. (frame.args['name'] ? frame.args['name'] : 'nil') local content = (args['text'] or args[2]) or "" if content
return ez