Modül:GununMaddesi: Revizyonlar arasındaki fark

Hukukipedia sitesinden
Gezinti kısmına atla Arama kısmına atla
"local p = {} function p.extract(frame) local title = mw.title.new(frame.args[1]) if not title or not title.exists then return "Madde bulunamadı." end local content = title:getContent() or "" local firstPara = content:match("^(.-)\n\n") or content return firstPara end return p" içeriğiyle yeni sayfa oluşturdu
 
Admin (mesaj) tarafından yapılan 579 numaralı revizyona sahip değişiklik geri alındı
Etiket: Geri al
 
(Aynı kullanıcının aradaki diğer 2 değişikliği gösterilmiyor)
4. satır: 4. satır:
     local title = mw.title.new(frame.args[1])
     local title = mw.title.new(frame.args[1])
     if not title or not title.exists then
     if not title or not title.exists then
         return "Madde bulunamadı."
         return "<i>Madde bulunamadı.</i>"
     end
     end


     local content = title:getContent() or ""
     local content = title:getContent() or ""
     local firstPara = content:match("^(.-)\n\n") or content
     local firstPara = content:match("^(.-)\n\n") or content
    -- nowiki kalıntılarını temizle
    firstPara = firstPara:gsub("__NOTOC__", "")
    firstPara = firstPara:gsub("__NOEDITSECTION__", "")
     return firstPara
     return firstPara
end
end


return p
return p

07.59, 16 Kasım 2025 itibarı ile sayfanın şu anki hâli

Bu modül için bir Modül:GununMaddesi/belge belgelendirmesi oluşturabilirsiniz

local p = {}

function p.extract(frame)
    local title = mw.title.new(frame.args[1])
    if not title or not title.exists then
        return "<i>Madde bulunamadı.</i>"
    end

    local content = title:getContent() or ""
    local firstPara = content:match("^(.-)\n\n") or content

    -- nowiki kalıntılarını temizle
    firstPara = firstPara:gsub("__NOTOC__", "")
    firstPara = firstPara:gsub("__NOEDITSECTION__", "")

    return firstPara
end

return p