「モジュール:CustomLink」の版間の差分

提供:ヘイグ - 総合ゲームメディア
移動先:案内検索
(ページの作成:「local p = {} function p.makeLink(frame) local url = frame.args.url local text = frame.args.text local class = frame.args.class or "" -- クラスはオプション if not url or not text then return "リンク情報が不足しています" end return string.format('<a href="%s" class="%s">%s</a>', url, class, text) end return p」)
 
編集の要約なし
 
10行目: 10行目:
     end
     end


     return string.format('<a href="%s" class="%s">%s</a>', url, class, text)
     return string.format('<htmltag tagname="ahref="%s" class="%s">%s</htmltag>', url, class, text)
end
end


return p
return p

2024年1月11日 (木) 21:24時点における最新版

このモジュールについての説明文ページを モジュール:CustomLink/doc に作成できます

local p = {}

function p.makeLink(frame)
    local url = frame.args.url
    local text = frame.args.text
    local class = frame.args.class or ""  -- クラスはオプション

    if not url or not text then
        return "リンク情報が不足しています"
    end

    return string.format('<htmltag tagname="a"  href="%s" class="%s">%s</htmltag>', url, class, text)
end

return p