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
 
Değişiklik özeti yok
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

04.56, 14 Kasım 2025 tarihindeki 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