<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AFixme</id>
	<title>Module:Fixme - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AFixme"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Fixme&amp;action=history"/>
	<updated>2026-04-16T05:05:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Fixme&amp;diff=136226&amp;oldid=prev</id>
		<title>imported&gt;Mr. Stradivarius: fix copy and paste fail</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Fixme&amp;diff=136226&amp;oldid=prev"/>
		<updated>2013-08-20T12:04:51Z</updated>

		<summary type="html">&lt;p&gt;fix copy and paste fail&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module searches through the specified Lua module, and if it finds the text &amp;quot;FIXME&amp;quot; it adds it to a tracking category.&lt;br /&gt;
&lt;br /&gt;
local trackingCategory = &amp;#039;Lua modules with fixme tags&amp;#039;&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Gets a title object for the specified page, and defaults to the&lt;br /&gt;
-- title object for the current page if it is not specified or if&lt;br /&gt;
-- there are any errors.&lt;br /&gt;
local function getTitleObject( page )&lt;br /&gt;
    local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
    if page then&lt;br /&gt;
        -- Get the title object, passing the function through pcall &lt;br /&gt;
        -- in case we are over the expensive function count limit.&lt;br /&gt;
        local noError, titleObject = pcall( mw.title.new, page )&lt;br /&gt;
        if not noError or not titleObject then&lt;br /&gt;
            return currentTitle&lt;br /&gt;
        else&lt;br /&gt;
            return titleObject&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        return currentTitle&lt;br /&gt;
    end    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function _main( page )&lt;br /&gt;
    page = getTitleObject( page )&lt;br /&gt;
    -- This module should only be used to search for other modules.&lt;br /&gt;
    if page.nsText ~= &amp;#039;Module&amp;#039; then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    -- Match the base page if we are being called from a sandbox or a /doc page.&lt;br /&gt;
    local subpage = page.subpageText&lt;br /&gt;
    if page.isSubpage and ( subpage == &amp;#039;doc&amp;#039; or subpage == &amp;#039;sandbox&amp;#039; ) then&lt;br /&gt;
        page = getTitleObject( page.baseText )&lt;br /&gt;
    end&lt;br /&gt;
    -- The module shouldn&amp;#039;t match itself.&lt;br /&gt;
    if page.prefixedText == &amp;#039;Module:Fixme&amp;#039; then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    -- Get the page content.&lt;br /&gt;
    local content = page:getContent()&lt;br /&gt;
    if not content then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    -- Find any &amp;quot;FIXME&amp;quot; text.&lt;br /&gt;
    local fixmeExists = false&lt;br /&gt;
    local fixmePattern = &amp;#039;%WFIXME%W&amp;#039;&lt;br /&gt;
    for singleLineComment in mw.ustring.gmatch( content, &amp;#039;%-%-([^\n]*)&amp;#039; ) do&lt;br /&gt;
        if mw.ustring.find( singleLineComment, fixmePattern ) then&lt;br /&gt;
            fixmeExists = true&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if not fixmeExists then&lt;br /&gt;
        for multiLineComment in mw.ustring.gmatch( content, &amp;#039;(%-%-%[(=*)%[.-%]%2%])&amp;#039; ) do&lt;br /&gt;
            if mw.ustring.find( multiLineComment, fixmePattern ) then&lt;br /&gt;
                fixmeExists = true&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    -- If any FIXMEs were found, return the tracking category.&lt;br /&gt;
    if fixmeExists then&lt;br /&gt;
        return mw.ustring.format( &amp;#039;[[Category:%s|%s]]&amp;#039;, trackingCategory, page.text )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    -- If we are being called from #invoke, then the page name is the first positional&lt;br /&gt;
    -- argument. If not, it is the frame parameter.&lt;br /&gt;
    local page&lt;br /&gt;
    if frame == mw.getCurrentFrame() then&lt;br /&gt;
        page = frame:getParent().args[ 1 ]&lt;br /&gt;
        local framePage = frame.args[ 1 ]&lt;br /&gt;
        if framePage then&lt;br /&gt;
            page = framePage&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        page = frame&lt;br /&gt;
    end&lt;br /&gt;
    return _main( page )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Mr. Stradivarius</name></author>
	</entry>
</feed>