עריכת הדף "
יחידה:קטע
"
קפיצה לניווט
קפיצה לחיפוש
אזהרה:
אינכם מחוברים לחשבון. כתובת ה־IP שלכם תוצג בפומבי אם תבצעו עריכות כלשהן. אם
תיכנסו לחשבון
או
תיצרו חשבון
, העריכות שלכם תיוחסנה לשם המשתמש שלכם ותקבלו גם יתרונות אחרים.
בדיקת אנטי־ספאם.
אין
למלא שדה זה!
-- חיקוי של הרחבת Labeled Section Transclusion (הפונקציה #קטע) עבור טקסטים שהועתקו מוויקיטקסט. -- הסימונים בדפים הם הערות HTML בצורה <!--קטע התחלה=שם--> ... <!--קטע סוף=שם--> local p = {} local function trim(s) return mw.text.trim(s or '') end local function cleanTransclusion(text) text = mw.ustring.gsub(text, '<noinclude>.-</noinclude>', '') text = mw.ustring.gsub(text, '</?includeonly>', '') text = mw.ustring.gsub(text, '<onlyinclude>', '') text = mw.ustring.gsub(text, '</onlyinclude>', '') return text end function p.section(frame) local args = frame.args local pageName = trim(args[1]) local label = trim(args[2]) if pageName == '' or label == '' then return '' end local title = mw.title.new(pageName) if not title then return '' end local content = title:getContent() if not content then return '' end local startMark = '<!--קטע התחלה=' .. label .. '-->' local endMark = '<!--קטע סוף=' .. label .. '-->' local parts = {} local pos = 1 while true do local s, e = string.find(content, startMark, pos, true) if not s then break end local s2, e2 = string.find(content, endMark, e + 1, true) if s2 then table.insert(parts, string.sub(content, e + 1, s2 - 1)) pos = e2 + 1 else table.insert(parts, string.sub(content, e + 1)) break end end if #parts == 0 then return '' end return frame:preprocess(cleanTransclusion(table.concat(parts, '\n'))) end function p.exclude(frame) local args = frame.args local pageName = trim(args[1]) local label = trim(args[2]) if pageName == '' then return '' end local title = mw.title.new(pageName) if not title then return '' end local content = title:getContent() if not content then return '' end if label ~= '' then local startMark = '<!--קטע התחלה=' .. label .. '-->' local endMark = '<!--קטע סוף=' .. label .. '-->' while true do local s, e = string.find(content, startMark, 1, true) if not s then break end local s2, e2 = string.find(content, endMark, e + 1, true) if s2 then content = string.sub(content, 1, s - 1) .. string.sub(content, e2 + 1) else content = string.sub(content, 1, s - 1) break end end end return frame:preprocess(cleanTransclusion(content)) end return p
תקציר:
לתשומת ליבך: תרומתך לאתר חב"דטקסט תפורסם לפי תנאי הרישיון
Creative Commons ייחוס־שימוש לא מסחרי־שיתוף זהה 2.5
(אפשר לעיין בדף
חב"דטקסט:זכויות יוצרים
לפרטים נוספים). אם אינך רוצה שעבודתך תהיה זמינה לעריכה על־ידי אחרים, שתופץ לעיני כול, ושאחרים יוכלו להעתיק ממנה תוך ציון המקור ובהתאם לתנאי הרישיון – אין לפרסם אותה פה.
כמו־כן, שמירת העריכה משמעה הבטחה שכתבת את הטקסט הזה בעצמך או העתקת אותו ממקור בנחלת הכלל (שאינו מוגבל בזכויות יוצרים) או ממקור ברישיון תואם לרישיון האתר.
אין לשלוח חומר מוגבל בזכויות יוצרים ללא רשות!
ביטול
עזרה בעריכה
(נפתח בחלון חדש)
תבנית המופיעה בדף זה:
יחידה:קטע/תיעוד
(
עריכה
)
תפריט ניווט
כלים אישיים
לא בחשבון
שיחה
תרומות
יצירת חשבון
כניסה לחשבון
מרחבי שם
יחידה
שיחה
English
צפיות
קריאה
עריכת קוד מקור
גרסאות קודמות
עוד
ניווט
עמוד ראשי
ספריה ראשית
חיפוש נכון
דף אקראי
חב"דטקסט להורדה
דיווח על טעות
עזרה
קהילה
ברוכים הבאים
פרוייקט החממה
שינויים אחרונים
אולם דיונים
לוח מודעות
תחזוקה
זכויות יוצרים
כלים
דפים המקושרים לכאן
שינויים בדפים המקושרים
דפים מיוחדים
מידע על הדף