<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elanthipedia.play.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AWordCount</id>
	<title>Module:WordCount - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://elanthipedia.play.net/index.php?action=history&amp;feed=atom&amp;title=Module%3AWordCount"/>
	<link rel="alternate" type="text/html" href="https://elanthipedia.play.net/index.php?title=Module:WordCount&amp;action=history"/>
	<updated>2026-04-25T15:25:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://elanthipedia.play.net/index.php?title=Module:WordCount&amp;diff=685708&amp;oldid=prev</id>
		<title>TURQ2: adds Word Count functionality to wiki using Scribunto</title>
		<link rel="alternate" type="text/html" href="https://elanthipedia.play.net/index.php?title=Module:WordCount&amp;diff=685708&amp;oldid=prev"/>
		<updated>2025-12-19T07:53:38Z</updated>

		<summary type="html">&lt;p&gt;adds Word Count functionality to wiki using Scribunto&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;
function p.count(frame)&lt;br /&gt;
    -- Get the content from the template&lt;br /&gt;
    local text = frame.args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    -- 1. Remove HTML tags (like &amp;lt;br /&amp;gt;)&lt;br /&gt;
    text = text:gsub(&amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    -- 2. Remove wiki-links syntax but keep the words inside&lt;br /&gt;
    -- Transforms [[Link|Text]] into Text&lt;br /&gt;
    text = text:gsub(&amp;quot;%[%[[^%|%]]*%|([^%]]*)%]%]&amp;quot;, &amp;quot;%1&amp;quot;)&lt;br /&gt;
    -- Transforms [[Link]] into Link&lt;br /&gt;
    text = text:gsub(&amp;quot;%[%[([^%]]*)%]%]&amp;quot;, &amp;quot;%1&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    -- 3. Count non-whitespace sequences&lt;br /&gt;
    local _, count = text:gsub(&amp;quot;%S+&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return count&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>TURQ2</name></author>
	</entry>
</feed>