<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nb">
	<id>https://mtdb.no/index.php?action=history&amp;feed=atom&amp;title=Modul%3AArticle</id>
	<title>Modul:Article - Sideversjonshistorikk</title>
	<link rel="self" type="application/atom+xml" href="https://mtdb.no/index.php?action=history&amp;feed=atom&amp;title=Modul%3AArticle"/>
	<link rel="alternate" type="text/html" href="https://mtdb.no/index.php?title=Modul:Article&amp;action=history"/>
	<updated>2026-05-18T14:46:30Z</updated>
	<subtitle>Versjonshistorikk for denne siden på wikien</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mtdb.no/index.php?title=Modul:Article&amp;diff=229&amp;oldid=prev</id>
		<title>Toro Andersen: Én revisjon er importert</title>
		<link rel="alternate" type="text/html" href="https://mtdb.no/index.php?title=Modul:Article&amp;diff=229&amp;oldid=prev"/>
		<updated>2018-01-22T19:15:37Z</updated>

		<summary type="html">&lt;p&gt;Én revisjon er importert&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny side&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local scrubs&lt;br /&gt;
scrubs = {&lt;br /&gt;
	[&amp;quot;scrub-tags&amp;quot;] = function(text)&lt;br /&gt;
		return mw.ustring.gsub(text, &amp;#039;%b&amp;lt;&amp;gt;&amp;#039;, &amp;#039;&amp;#039; )&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;scrub-templates&amp;quot;] = function(text)&lt;br /&gt;
		return mw.ustring.gsub(text, &amp;#039;%b{}&amp;#039;, &amp;#039;&amp;#039; )&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;scrub-extlinks&amp;quot;] = function(text)&lt;br /&gt;
		return mw.ustring.gsub(text, &amp;#039;%[[htps]*:?//%w[^%s]+%s*([^%]]*)%]&amp;#039;, &amp;#039;%1&amp;#039; )&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;scrub-magics&amp;quot;] = function(text)&lt;br /&gt;
		return mw.ustring.gsub(text, &amp;#039;__[_%w]+__&amp;#039;, &amp;#039;&amp;#039; )&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;scrub-links&amp;quot;] = function(text)&lt;br /&gt;
		local text = mw.ustring.gsub(text, &amp;#039;%[%[[^|%]]+%|([^%]]+)%]%]&amp;#039;, &amp;#039;%1&amp;#039; )&lt;br /&gt;
		text = mw.ustring.gsub(text, &amp;#039;%[%[([^|%]]+)%]%]&amp;#039;, &amp;#039;%1&amp;#039; )&lt;br /&gt;
		return text&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;scrub-sections&amp;quot;] = function(text)&lt;br /&gt;
		return mw.ustring.gsub(text, &amp;#039;==+[^=\n]+==+&amp;#039;, &amp;#039;&amp;#039; )&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;scrub-all&amp;quot;] = function(text)&lt;br /&gt;
		text = scrubs[&amp;quot;scrub-tags&amp;quot;](text)&lt;br /&gt;
		text = scrubs[&amp;quot;scrub-templates&amp;quot;](text)&lt;br /&gt;
		text = scrubs[&amp;quot;scrub-links&amp;quot;](text)&lt;br /&gt;
		text = scrubs[&amp;quot;scrub-extlinks&amp;quot;](text)&lt;br /&gt;
		text = scrubs[&amp;quot;scrub-magics&amp;quot;](text)&lt;br /&gt;
		text = scrubs[&amp;quot;scrub-sections&amp;quot;](text)&lt;br /&gt;
		return text&lt;br /&gt;
	end&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local tests&lt;br /&gt;
tests = {&lt;br /&gt;
	[&amp;quot;length&amp;quot;] = function(text)&lt;br /&gt;
		return mw.ustring.len( text )&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;extlinks&amp;quot;] = function(text)&lt;br /&gt;
		local count = 0&lt;br /&gt;
		for line in string.gmatch(text, &amp;#039;%[[htps]*:?//%w[^%s]+%s*([^%]]*)%]&amp;#039;) do&lt;br /&gt;
			count = 1 + count&lt;br /&gt;
		end&lt;br /&gt;
		return count&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;links&amp;quot;] = function(text)&lt;br /&gt;
		mw.log(&amp;#039;enter links&amp;#039;)&lt;br /&gt;
		local count = 0&lt;br /&gt;
		for line in string.gmatch(text, &amp;#039;%[%[[^|%]]+%|[^%]]+%]%]&amp;#039;) do&lt;br /&gt;
			count = 1 + count&lt;br /&gt;
		end&lt;br /&gt;
		for line in string.gmatch(text, &amp;#039;%[%[[^|%]]+%]%]&amp;#039;) do&lt;br /&gt;
			count = 1 + count&lt;br /&gt;
		end&lt;br /&gt;
		return count&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;lines&amp;quot;] = function(text)&lt;br /&gt;
		local count = 0&lt;br /&gt;
		for line in string.gmatch(text, &amp;#039;([^\n]+)&amp;#039;) do&lt;br /&gt;
			if mw.ustring.find( line, &amp;#039;%w&amp;#039;, init, plain ) then&lt;br /&gt;
				count = 1 + count&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return count&lt;br /&gt;
	end,&lt;br /&gt;
	[&amp;quot;words&amp;quot;] = function(text)&lt;br /&gt;
		local count = 0&lt;br /&gt;
		for line in string.gmatch(text, &amp;#039;([^%s]+)&amp;#039;) do&lt;br /&gt;
			if mw.ustring.find( line, &amp;#039;%a&amp;#039;, init, plain ) then&lt;br /&gt;
				count = 1 + count&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return count&lt;br /&gt;
	end,&lt;br /&gt;
	-- anslag&lt;br /&gt;
	[&amp;quot;characters&amp;quot;] = function(text)&lt;br /&gt;
		local _,count = mw.ustring.gsub(text, &amp;#039;%s&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
		return mw.ustring.len( text ) - count&lt;br /&gt;
	end&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
p.tests=tests&lt;br /&gt;
p.scrubs = scrubs&lt;br /&gt;
&lt;br /&gt;
function p._stats(content, args)&lt;br /&gt;
	for k,v in ipairs(args) do&lt;br /&gt;
		local num = tonumber(k)&lt;br /&gt;
		if num and num ~= 1 then&lt;br /&gt;
			if scrubs[v] then&lt;br /&gt;
				content = scrubs[v](content)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local acc = 0&lt;br /&gt;
	for k,v in pairs(args) do&lt;br /&gt;
		local num = tonumber(k)&lt;br /&gt;
		if not num and k then&lt;br /&gt;
			if tests[k] then&lt;br /&gt;
				acc = acc + tonumber(v) * tests[k](content)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return acc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.stats(frame)&lt;br /&gt;
	return p._stats(mw.title.getCurrentTitle():getContent(), (frame or mw.getCurrentFrame()).args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Toro Andersen</name></author>
	</entry>
</feed>