<?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%3ASandbox%2FLord_Belbury%2FAdd_quotemarks</id>
	<title>Module:Sandbox/Lord Belbury/Add quotemarks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FLord_Belbury%2FAdd_quotemarks"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Lord_Belbury/Add_quotemarks&amp;action=history"/>
	<updated>2026-04-04T05:02:09Z</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:Sandbox/Lord_Belbury/Add_quotemarks&amp;diff=145743&amp;oldid=prev</id>
		<title>imported&gt;Pppery: Pppery moved page Module:Add quotemarks to Module:Sandbox/Lord Belbury/Add quotemarks without leaving a redirect: Userfying module implementing userfied template</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Lord_Belbury/Add_quotemarks&amp;diff=145743&amp;oldid=prev"/>
		<updated>2020-09-15T14:32:37Z</updated>

		<summary type="html">&lt;p&gt;Pppery moved page &lt;a href=&quot;/index.php?title=Module:Add_quotemarks&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:Add quotemarks (page does not exist)&quot;&gt;Module:Add quotemarks&lt;/a&gt; to &lt;a href=&quot;/research/Module:Sandbox/Lord_Belbury/Add_quotemarks&quot; title=&quot;Module:Sandbox/Lord Belbury/Add quotemarks&quot;&gt;Module:Sandbox/Lord Belbury/Add quotemarks&lt;/a&gt; without leaving a redirect: Userfying module implementing userfied template&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._addquotes(s)&lt;br /&gt;
	if s then&lt;br /&gt;
		if s:match([[^([&amp;#039;&amp;quot;]).*%1$]]) or s:match([[^‘.*’$]]) or s:match([[^“.*”$]]) then&lt;br /&gt;
			-- If the string starts and ends with a quotemark (or starts and ends with an apostrophe), display it unchanged&lt;br /&gt;
			return s&lt;br /&gt;
		elseif s:match([[([&amp;quot;“”])]]) or s:match([[([&amp;#039;‘’])%s]]) or s:match([[%s([&amp;#039;‘’])]])  or s:match([[^([&amp;#039;‘’])]]) then&lt;br /&gt;
			-- Otherwise if the string contains any quotemarks at all, or any apostrophes that aren&amp;#039;t in the middle of a word (excluding end-of-string, which may be a possessive)	, display it unchanged and add a hidden category to flag that the template call is providing something more complex than a single literal translation&lt;br /&gt;
			return s .. &amp;quot;[[:Category:Articles with unusually formatted quotations]]&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			-- Otherwise (ie. if the string contains no quotemarks, and any apostrophes are in the middles of words), display it surrounded by additional quotemarks&lt;br /&gt;
			return &amp;quot;\&amp;quot;&amp;quot; .. s .. &amp;quot;\&amp;quot;&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;zzz&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.addquotes(frame)&lt;br /&gt;
	local s = (frame.args[&amp;#039;s&amp;#039;] or frame.args[1]) or (frame:getParent().args[&amp;#039;s&amp;#039;] or frame:getParent().args[1])&lt;br /&gt;
	return p._addquotes(s)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Pppery</name></author>
	</entry>
</feed>