<?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-04-24T20:47:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.4</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('Module:HtmlBuilder')&lt;br /&gt;
local getLanguageCode = require('Module:Languages').getLanguageCode&lt;br /&gt;
local makeInvokeFunc = require('Module:Arguments').makeInvokeFunc&lt;br /&gt;
&lt;br /&gt;
function p._main(frame, args)&lt;br /&gt;
    local headingParam = args['heading']&lt;br /&gt;
    local contentParam = args['content']&lt;br /&gt;
    local linkBoxParam = args['link box']&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['page']&lt;br /&gt;
        if pageName then&lt;br /&gt;
            if currentLangCode == 'en' then&lt;br /&gt;
                docPageName = pageName .. '/doc'&lt;br /&gt;
            else&lt;br /&gt;
                docPageName = pageName .. '/doc/' .. currentLangCode&lt;br /&gt;
            end&lt;br /&gt;
        else&lt;br /&gt;
            if currentLangCode == 'en' then&lt;br /&gt;
                docPageName = currentTitle.fullText .. '/doc'&lt;br /&gt;
            else&lt;br /&gt;
                local namespace = currentTitle.nsText&lt;br /&gt;
                local basePageName = currentTitle.baseText&lt;br /&gt;
                docPageName = namespace .. ':' .. basePageName  .. '/doc/' .. 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('div')&lt;br /&gt;
    startBox:cssText('clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 12px')&lt;br /&gt;
&lt;br /&gt;
    -- Add heading if non-empty&lt;br /&gt;
    if headingParam ~= '' then&lt;br /&gt;
        local headingDiv = startBox:tag('div')&lt;br /&gt;
        headingDiv:cssText('padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex')&lt;br /&gt;
&lt;br /&gt;
        local headingSpan = headingDiv:tag('span')&lt;br /&gt;
        headingSpan:cssText('font-weight: bold; font-size: 125%')&lt;br /&gt;
        if headingParam then&lt;br /&gt;
            headingSpan:wikitext(headingParam)&lt;br /&gt;
        else&lt;br /&gt;
            headingSpan:wikitext('[[File:Documentation icon.png|50px|link=]] ' .. args['default-heading'])&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('span')&lt;br /&gt;
            actionsSpan:addClass('plainlinks')&lt;br /&gt;
            actionsSpan:cssText('font-size: small; font-weight: 400; margin-left: 1em; vertical-align: baseline; line-height: 1em; display: inline-block')&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;amp;#91;')&lt;br /&gt;
                s = s:gsub('%]', '&amp;amp;#93;')&lt;br /&gt;
                return s&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            if docPageTitle.exists then&lt;br /&gt;
                format = '[%s] [%s] [%s] [%s]'&lt;br /&gt;
                local viewLink = '[[:' .. docPageName .. '|' .. args['view-link-display'] .. ']]'&lt;br /&gt;
                local editLink = '[' .. docPageTitle:fullUrl{action = 'edit'} .. ' ' .. args['edit-link-display'] .. ']'&lt;br /&gt;
                local historyLink = '[' .. docPageTitle:fullUrl{action = 'history'} .. ' ' .. args['history-link-display'] .. ']'&lt;br /&gt;
                local purgeLink = '[' .. currentTitle:fullUrl{action = 'purge'} .. ' ' .. args['purge-link-display'] .. ']'&lt;br /&gt;
                actionsSpan:wikitext(mw.ustring.format(escapeBrackets('[%s] [%s] [%s] [%s]'), viewLink, editLink, historyLink, purgeLink))&lt;br /&gt;
            else&lt;br /&gt;
                local createLink = '[' .. docPageTitle:fullUrl{action = 'edit'} .. ' ' .. args['create-link-display'] .. ']'&lt;br /&gt;
                actionsSpan:wikitext(mw.ustring.format(escapeBrackets('[%s]'), 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 = ':' .. 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('\n' .. content .. '\n')&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('div')&lt;br /&gt;
    clear:css('clear', 'both')&lt;br /&gt;
&lt;br /&gt;
    if not contentParam and linkBoxParam ~= 'off' and docPageTitle.exists then&lt;br /&gt;
        local endBox = root:tag('div')&lt;br /&gt;
        endBox:addClass('plainlinks')&lt;br /&gt;
        endBox:cssText('clear: both; width: 100%; border: 1px solid #aaa; margin: .2em 0; background-color: #ecfcf4')&lt;br /&gt;
&lt;br /&gt;
        local endBoxNode = endBox:tag('div')&lt;br /&gt;
        endBoxNode:cssText('border: none; width: 100%; padding: .25em .9em; font-style: italic')&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['transcluded-from-blurb'], '[[:' .. docPageName .. '|' .. docPageName .. ']]'), ' ')&lt;br /&gt;
&lt;br /&gt;
            local editUrl = docPageTitle:fullUrl{action = 'edit'}&lt;br /&gt;
            local historyUrl = docPageTitle:fullUrl{action = 'history'}&lt;br /&gt;
            local actionsNode = endBoxNode:tag('small')&lt;br /&gt;
            actionsNode:cssText('font-style: normal')&lt;br /&gt;
            actionsNode:wikitext('([', editUrl, ' ' .. args['edit-link-display'] .. '] | [', historyUrl, ' ' .. args['history-link-display'] .. '])')&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>