יחידה:הערה: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מ גרסה אחת של הדף wikipedia:he:יחידה:הערה יובאה
 
(19 גרסאות ביניים של 5 משתמשים אינן מוצגות)
שורה 7: שורה 7:
local refDic = {}
local refDic = {}
local args = argModule.getArgs(frame)
local args = argModule.getArgs(frame)
local refName = args['שם']
local refName = args['שם'] or args['name']
local refGroup = args['קבוצה']
local refGroup = args['קבוצה'] or args['group']
local direction = args['כיוון']
if direction and direction ~= 'ימין' and direction ~= 'שמאל' then
warnings = '<span class="error">פרמטר כיוון שגוי</span>[[קטגוריה:דפים עם שגיאות בהערה]]'
end
if args[2] then
if args[2] then
warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[קטגוריה:דפים עם שגיאות בהערה]]'
warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[קטגוריה:דפים עם שגיאות בהערה]]'
end
end
if args['שמאל'] then
text = '<div style="direction: ltr;text- align:left;">' .. frame.args[1] .. '</div>'
text = args[1]
else
text = frame.args[1]
if text then
text = frame:preprocess(args[1])
end
end
if refName and #refName then refDic['name'] = refName end
if refGroup and #refGroup then refDic['group'] = refGroup end
if direction and direction=='שמאל' then refDic['dir'] = 'ltr' end
if direction and direction=='ימין' then refDic['dir'] = 'rtl' end
 
if text and #text>0 then
if text and #text>0 then
if refName and #refName>0 and refGroup and #refGroup>0 then
return frame:extensionTag{ name = 'ref', content=text, args = refDic } .. warnings
return frame:callParserFunction{ name = '#tag:ref', args = { text, name = refName, group = refGroup } } .. warnings
end
if refName and #refName>0 then
return frame:callParserFunction{ name = '#tag:ref', args = { text, name = refName } } .. warnings
end
if refGroup and #refGroup>0 then
return frame:callParserFunction{ name = '#tag:ref', args = { text, group = refGroup } } .. warnings
end
return frame:callParserFunction{ name = '#tag:ref', args = { text } }
else
else
if refName and #refName>0 and refGroup and #refGroup>0 then
return frame:extensionTag{ name = 'ref', args = refDic } .. warnings
return frame:callParserFunction{ name = '#tag:ref', args = { name = refName, group = refGroup } } .. warnings
end
if refName and #refName>0 then
return frame:callParserFunction{ name = '#tag:ref', args = { name = refName } } .. warnings
end
if refGroup and #refGroup>0 then
return frame:callParserFunction{ name = '#tag:ref', args = { group = refGroup } } .. warnings
end
end
end
end
end


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