モジュール:CustomLink

提供:ヘイグ - 総合ゲームメディア
2024年1月11日 (木) 20:48時点におけるWiki admin (トーク | 投稿記録)による版 (ページの作成:「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」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

このモジュールについての説明文ページを モジュール: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('<a href="%s" class="%s">%s</a>', url, class, text)
end

return p