<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://agatadia.com/wiki/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3ALabelled_list_hatnote</id>
	<title>モジュール:Labelled list hatnote - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://agatadia.com/wiki/index.php?action=history&amp;feed=atom&amp;title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%3ALabelled_list_hatnote"/>
	<link rel="alternate" type="text/html" href="https://agatadia.com/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Labelled_list_hatnote&amp;action=history"/>
	<updated>2026-04-11T18:50:29Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://agatadia.com/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Labelled_list_hatnote&amp;diff=104&amp;oldid=prev</id>
		<title>Szkt: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://agatadia.com/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Labelled_list_hatnote&amp;diff=104&amp;oldid=prev"/>
		<updated>2025-05-29T07:58:29Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025年5月29日 (木) 16:58時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key szkt_agatadia:diff:1.41:old-103:rev-104 --&gt;
&lt;/table&gt;</summary>
		<author><name>Szkt</name></author>
	</entry>
	<entry>
		<id>https://agatadia.com/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Labelled_list_hatnote&amp;diff=103&amp;oldid=prev</id>
		<title>ja&gt;Mt.Asahidake: 「モジュール:Labelled list hatnote」を保護しました: 影響が特に大きいテンプレート ([編集=拡張承認された利用者と管理者に許可] (無期限) [移動=拡張承認された利用者と管理者に許可] (無期限))</title>
		<link rel="alternate" type="text/html" href="https://agatadia.com/wiki/index.php?title=%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Labelled_list_hatnote&amp;diff=103&amp;oldid=prev"/>
		<updated>2025-01-01T09:37:58Z</updated>

		<summary type="html">&lt;p&gt;「&lt;a href=&quot;/wiki/%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Labelled_list_hatnote&quot; title=&quot;モジュール:Labelled list hatnote&quot;&gt;モジュール:Labelled list hatnote&lt;/a&gt;」を保護しました: &lt;a href=&quot;/wiki/index.php?title=WP:HRT&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:HRT (存在しないページ)&quot;&gt;影響が特に大きいテンプレート&lt;/a&gt; ([編集=拡張承認された利用者と管理者に許可] (無期限) [移動=拡張承認された利用者と管理者に許可] (無期限))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
local mHatlist = require(&amp;#039;Module:Hatnote list&amp;#039;)&lt;br /&gt;
local mArguments -- initialize lazily&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Defaults global to this module&lt;br /&gt;
local defaults = {&lt;br /&gt;
    label = &amp;#039;を参照&amp;#039;, -- Final fallback for label argument&lt;br /&gt;
    mainLabelForm = &amp;#039;→詳細は%s%s&amp;#039;, -- Label format for main template&lt;br /&gt;
    labelForm = &amp;#039;→%s%s&amp;#039;, -- Label format for see_also template&lt;br /&gt;
    prefixes = {&amp;#039;label&amp;#039;, &amp;#039;label &amp;#039;, &amp;#039;l&amp;#039;},&lt;br /&gt;
    template = &amp;#039;Module:Labelled list hatnote&amp;#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Helper function that pre-combines display parameters into page arguments.&lt;br /&gt;
-- Also compresses sparse arrays, as a desirable side-effect.&lt;br /&gt;
function p.preprocessDisplays(args, prefixes)&lt;br /&gt;
    prefixes = prefixes or defaults.prefixes&lt;br /&gt;
    local pages = {}&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        if type(k) == &amp;#039;number&amp;#039; then&lt;br /&gt;
            local display&lt;br /&gt;
            for i = 1, #prefixes do&lt;br /&gt;
                display = args[prefixes[i] .. k]&lt;br /&gt;
                if display then break end&lt;br /&gt;
            end&lt;br /&gt;
            local page = display and&lt;br /&gt;
                string.format(&amp;#039;%s|%s&amp;#039;, string.gsub(v, &amp;#039;|.*$&amp;#039;, &amp;#039;&amp;#039;), display) or v&lt;br /&gt;
            pages[#pages + 1] = page&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return pages&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Produces a labelled pages-list hatnote.&lt;br /&gt;
function p.labelledList(frame)&lt;br /&gt;
    mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
    local template = frame:getParent():getTitle()&lt;br /&gt;
    if template ~= &amp;#039;Template:Main&amp;#039; and template ~= &amp;#039;Template:Main/sandbox&amp;#039; then&lt;br /&gt;
        template = &amp;#039;Template:See Also&amp;#039; -- Default template if not Main&lt;br /&gt;
    end&lt;br /&gt;
    local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
    local pages = p.preprocessDisplays(args)&lt;br /&gt;
&lt;br /&gt;
    local labels&lt;br /&gt;
    local labelForm&lt;br /&gt;
    if template == &amp;#039;Template:Main&amp;#039; or template == &amp;#039;Template:Main/sandbox&amp;#039; then&lt;br /&gt;
        labels = {defaults.label}&lt;br /&gt;
        labelForm = frame.args.labelForm or defaults.mainLabelForm&lt;br /&gt;
    else&lt;br /&gt;
        labels = {frame.args[1] or defaults.label}&lt;br /&gt;
        labels[2] = frame.args[2] or labels[1]&lt;br /&gt;
        labelForm = frame.args.labelForm or defaults.labelForm&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local options = {&lt;br /&gt;
        extraclasses = frame.args.extraclasses,&lt;br /&gt;
        category = args.category,&lt;br /&gt;
        selfref = frame.args.selfref or args.selfref,&lt;br /&gt;
        template = template,&lt;br /&gt;
        labelForm = labelForm&lt;br /&gt;
    }&lt;br /&gt;
    return p._labelledList(pages, labels, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._labelledList(pages, labels, options)&lt;br /&gt;
    labels = labels or {}&lt;br /&gt;
    if #pages == 0 then&lt;br /&gt;
        return mHatnote.makeWikitextError(&lt;br /&gt;
            &amp;#039;ページ名が指定されていません&amp;#039;,&lt;br /&gt;
            (options.template or defaults.template) .. &amp;#039;#エラー&amp;#039;,&lt;br /&gt;
            options.category&lt;br /&gt;
        )&lt;br /&gt;
    end&lt;br /&gt;
    local label = (#pages == 1 and labels[1] or labels[2]) or defaults.label&lt;br /&gt;
    local text = string.format(&lt;br /&gt;
        options.labelForm or defaults.labelForm,&lt;br /&gt;
        mHatlist.andList(pages, true),&lt;br /&gt;
        label&lt;br /&gt;
    )&lt;br /&gt;
    local classes = {}&lt;br /&gt;
    if type(options.extraclasses) == &amp;#039;string&amp;#039; then&lt;br /&gt;
    	classes[#classes + 1] = options.extraclasses&lt;br /&gt;
    end&lt;br /&gt;
    if options.selfref then&lt;br /&gt;
		classes[#classes + 1] = &amp;#039;selfref&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Render the HTML div with the specified style and classes&lt;br /&gt;
    local html = string.format(&lt;br /&gt;
        &amp;#039;&amp;lt;div class=&amp;quot;rellink %s&amp;quot; style=&amp;quot;margin-bottom: 0.5em; padding-left: 2em; font-size: 90%%;&amp;quot; role=&amp;quot;note&amp;quot;&amp;gt;%s&amp;lt;/div&amp;gt;&amp;#039;,&lt;br /&gt;
        table.concat(classes, &amp;#039; &amp;#039;),&lt;br /&gt;
        text&lt;br /&gt;
    )&lt;br /&gt;
    &lt;br /&gt;
    return html&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>ja&gt;Mt.Asahidake</name></author>
	</entry>
</feed>