יחידה:הערה: הבדלים בין גרסאות בדף
מראה
מ הפעיל הגנה על הדף "יחידה:הערה": בשימוש נרחב ([עריכה=רק עורכי ממשק מורשים] (בלתי מוגבלת בזמן) [העברה=רק עורכי ממשק מורשים] (בלתי מוגבלת בזמן)) |
מאין תקציר עריכה |
||
| שורה 10: | שורה 10: | ||
local refGroup = args['קבוצה'] | local refGroup = args['קבוצה'] | ||
local isLtr = args['שמאל'] | local isLtr = args['שמאל'] | ||
local isRtl = args['ימין'] | |||
if args[2] then | if args[2] then | ||
warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[קטגוריה:דפים עם שגיאות בהערה]]' | warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[קטגוריה:דפים עם שגיאות בהערה]]' | ||
| שורה 22: | שורה 23: | ||
if refGroup and #refGroup then refDic['group'] = refGroup end | if refGroup and #refGroup then refDic['group'] = refGroup end | ||
if isLtr and isLtr=='כן' then refDic['dir'] = 'ltr' 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 | if text and #text>0 then | ||
גרסה מ־11:43, 1 ביוני 2018
ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:הערה/תיעוד
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 args[2] then
warnings = '<span class="error"><sup> פרמטר שני בהערה: </sup></span>[[קטגוריה:דפים עם שגיאות בהערה]]'
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