Module:הערה

local Ref = {}

function parseRef(frame) local argModule = require('Module:Arguments') local warnings='' local text='' local refDic = {} local args = argModule.getArgs(frame) local refName = args['שם'] local refGroup = args['קבוצה'] local isLtr = args['שמאל'] local isRtl = args['ימין'] if isLtr and isRtl then warnings = ' פרמטרים מגדירים כיווניות סותרים ' end if args[2] then warnings = ' פרמטר שני בהערה: ' end text = args[1] if text then text = frame:preprocess(args[1]) end if refName and #refName then refDic['name'] = refName end if refGroup and #refGroup then refDic['group'] = refGroup end if isLtr and isLtr=='כן' then refDic['dir'] = 'ltr' end if isRtl and isRtl=='כן' then refDic['dir'] = 'rtl' end if text and #text>0 then return frame:extensionTag{ name = 'ref', content=text, args = refDic } .. warnings else return frame:extensionTag{ name = 'ref', args = refDic } .. warnings end end

Ref['הערה'] = parseRef Ref['parseRef'] = parseRef return Ref