<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.minetest.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ADocumentation</id>
	<title>Module:Documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.minetest.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ADocumentation"/>
	<link rel="alternate" type="text/html" href="https://wiki.minetest.org/index.php?title=Module:Documentation&amp;action=history"/>
	<updated>2026-06-11T02:32:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.minetest.org/index.php?title=Module:Documentation&amp;diff=15065&amp;oldid=prev</id>
		<title>&gt;FnControlOption: FnControlOption changed the content model of the page Module:Documentation from &quot;plain text&quot; to &quot;Scribunto&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.minetest.org/index.php?title=Module:Documentation&amp;diff=15065&amp;oldid=prev"/>
		<updated>2022-06-07T17:44:13Z</updated>

		<summary type="html">&lt;p&gt;FnControlOption changed the content model of the page &lt;a href=&quot;/Module:Documentation&quot; title=&quot;Module:Documentation&quot;&gt;Module:Documentation&lt;/a&gt; from &amp;quot;plain text&amp;quot; to &amp;quot;Scribunto&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local HtmlBuilder = require(&amp;#039;Module:HtmlBuilder&amp;#039;)&lt;br /&gt;
local getLanguageCode = require(&amp;#039;Module:Languages&amp;#039;).getLanguageCode&lt;br /&gt;
local makeInvokeFunc = require(&amp;#039;Module:Arguments&amp;#039;).makeInvokeFunc&lt;br /&gt;
&lt;br /&gt;
function p._main(frame, args)&lt;br /&gt;
    local headingParam = args[&amp;#039;heading&amp;#039;]&lt;br /&gt;
    local contentParam = args[&amp;#039;content&amp;#039;]&lt;br /&gt;
    local linkBoxParam = args[&amp;#039;link box&amp;#039;]&lt;br /&gt;
    local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
    local docPageName = args[1]&lt;br /&gt;
    if not docPageName then&lt;br /&gt;
        local currentLangCode = getLanguageCode(currentTitle)&lt;br /&gt;
        local pageName = args[&amp;#039;page&amp;#039;]&lt;br /&gt;
        if pageName then&lt;br /&gt;
            if currentLangCode == &amp;#039;en&amp;#039; then&lt;br /&gt;
                docPageName = pageName .. &amp;#039;/doc&amp;#039;&lt;br /&gt;
            else&lt;br /&gt;
                docPageName = pageName .. &amp;#039;/doc/&amp;#039; .. currentLangCode&lt;br /&gt;
            end&lt;br /&gt;
        else&lt;br /&gt;
            if currentLangCode == &amp;#039;en&amp;#039; then&lt;br /&gt;
                docPageName = currentTitle.fullText .. &amp;#039;/doc&amp;#039;&lt;br /&gt;
            else&lt;br /&gt;
                local namespace = currentTitle.nsText&lt;br /&gt;
                local basePageName = currentTitle.baseText&lt;br /&gt;
                docPageName = namespace .. &amp;#039;:&amp;#039; .. basePageName  .. &amp;#039;/doc/&amp;#039; .. currentLangCode&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    local docPageTitle = mw.title.new(docPageName)&lt;br /&gt;
&lt;br /&gt;
    local root = HtmlBuilder.create()&lt;br /&gt;
&lt;br /&gt;
    local startBox = root:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
    startBox:cssText(&amp;#039;clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 12px&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
    -- Add heading if non-empty&lt;br /&gt;
    if headingParam ~= &amp;#039;&amp;#039; then&lt;br /&gt;
        local headingDiv = startBox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        headingDiv:cssText(&amp;#039;padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
        local headingSpan = headingDiv:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
        headingSpan:cssText(&amp;#039;font-weight: bold; font-size: 125%&amp;#039;)&lt;br /&gt;
        if headingParam then&lt;br /&gt;
            headingSpan:wikitext(headingParam)&lt;br /&gt;
        else&lt;br /&gt;
            headingSpan:wikitext(&amp;#039;[[File:Documentation icon.png|50px|link=]] &amp;#039; .. args[&amp;#039;default-heading&amp;#039;])&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        -- Add action links if doc is not on template page&lt;br /&gt;
        if not contentParam then&lt;br /&gt;
            local actionsSpan = headingDiv:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
            actionsSpan:addClass(&amp;#039;plainlinks&amp;#039;)&lt;br /&gt;
            actionsSpan:cssText(&amp;#039;font-size: small; font-weight: 400; margin-left: 1em; vertical-align: baseline; line-height: 1em; display: inline-block&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
            local function escapeBrackets(s)&lt;br /&gt;
                -- Replace brackets with HTML entities&lt;br /&gt;
                s = s:gsub(&amp;#039;%[&amp;#039;, &amp;#039;&amp;amp;#91;&amp;#039;)&lt;br /&gt;
                s = s:gsub(&amp;#039;%]&amp;#039;, &amp;#039;&amp;amp;#93;&amp;#039;)&lt;br /&gt;
                return s&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            if docPageTitle.exists then&lt;br /&gt;
                format = &amp;#039;[%s] [%s] [%s] [%s]&amp;#039;&lt;br /&gt;
                local viewLink = &amp;#039;[[:&amp;#039; .. docPageName .. &amp;#039;|&amp;#039; .. args[&amp;#039;view-link-display&amp;#039;] .. &amp;#039;]]&amp;#039;&lt;br /&gt;
                local editLink = &amp;#039;[&amp;#039; .. docPageTitle:fullUrl{action = &amp;#039;edit&amp;#039;} .. &amp;#039; &amp;#039; .. args[&amp;#039;edit-link-display&amp;#039;] .. &amp;#039;]&amp;#039;&lt;br /&gt;
                local historyLink = &amp;#039;[&amp;#039; .. docPageTitle:fullUrl{action = &amp;#039;history&amp;#039;} .. &amp;#039; &amp;#039; .. args[&amp;#039;history-link-display&amp;#039;] .. &amp;#039;]&amp;#039;&lt;br /&gt;
                local purgeLink = &amp;#039;[&amp;#039; .. currentTitle:fullUrl{action = &amp;#039;purge&amp;#039;} .. &amp;#039; &amp;#039; .. args[&amp;#039;purge-link-display&amp;#039;] .. &amp;#039;]&amp;#039;&lt;br /&gt;
                actionsSpan:wikitext(mw.ustring.format(escapeBrackets(&amp;#039;[%s] [%s] [%s] [%s]&amp;#039;), viewLink, editLink, historyLink, purgeLink))&lt;br /&gt;
            else&lt;br /&gt;
                local createLink = &amp;#039;[&amp;#039; .. docPageTitle:fullUrl{action = &amp;#039;edit&amp;#039;} .. &amp;#039; &amp;#039; .. args[&amp;#039;create-link-display&amp;#039;] .. &amp;#039;]&amp;#039;&lt;br /&gt;
                actionsSpan:wikitext(mw.ustring.format(escapeBrackets(&amp;#039;[%s]&amp;#039;), createLink))&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Transclude doc contents&lt;br /&gt;
    local content = contentParam&lt;br /&gt;
    if not content and docPageTitle.exists then&lt;br /&gt;
        content = frame:expandTemplate{title = &amp;#039;:&amp;#039; .. docPageName}&lt;br /&gt;
    end&lt;br /&gt;
    if content then&lt;br /&gt;
        -- Add line breaks so headings at start and end are interpreted correctly&lt;br /&gt;
        startBox:wikitext(&amp;#039;\n&amp;#039; .. content .. &amp;#039;\n&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Prevent floating items from sticking out of doc box&lt;br /&gt;
    local clear = startBox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
    clear:css(&amp;#039;clear&amp;#039;, &amp;#039;both&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
    if not contentParam and linkBoxParam ~= &amp;#039;off&amp;#039; and docPageTitle.exists then&lt;br /&gt;
        local endBox = root:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        endBox:addClass(&amp;#039;plainlinks&amp;#039;)&lt;br /&gt;
        endBox:cssText(&amp;#039;clear: both; width: 100%; border: 1px solid #aaa; margin: .2em 0; background-color: #ecfcf4&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
        local endBoxNode = endBox:tag(&amp;#039;div&amp;#039;)&lt;br /&gt;
        endBoxNode:cssText(&amp;#039;border: none; width: 100%; padding: .25em .9em; font-style: italic&amp;#039;)&lt;br /&gt;
        if linkBoxParam then&lt;br /&gt;
            endBoxNode:wikitext(linkBoxParam)&lt;br /&gt;
        else&lt;br /&gt;
            endBoxNode:wikitext(mw.ustring.format(args[&amp;#039;transcluded-from-blurb&amp;#039;], &amp;#039;[[:&amp;#039; .. docPageName .. &amp;#039;|&amp;#039; .. docPageName .. &amp;#039;]]&amp;#039;), &amp;#039; &amp;#039;)&lt;br /&gt;
&lt;br /&gt;
            local editUrl = docPageTitle:fullUrl{action = &amp;#039;edit&amp;#039;}&lt;br /&gt;
            local historyUrl = docPageTitle:fullUrl{action = &amp;#039;history&amp;#039;}&lt;br /&gt;
            local actionsNode = endBoxNode:tag(&amp;#039;small&amp;#039;)&lt;br /&gt;
            actionsNode:cssText(&amp;#039;font-style: normal&amp;#039;)&lt;br /&gt;
            actionsNode:wikitext(&amp;#039;([&amp;#039;, editUrl, &amp;#039; &amp;#039; .. args[&amp;#039;edit-link-display&amp;#039;] .. &amp;#039;] | [&amp;#039;, historyUrl, &amp;#039; &amp;#039; .. args[&amp;#039;history-link-display&amp;#039;] .. &amp;#039;])&amp;#039;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.main = makeInvokeFunc(p._main, {passFrameParam = true, inherited = true})&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>&gt;FnControlOption</name></author>
	</entry>
</feed>