https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AConvert_character_width Module:Convert character width - Revision history 2025-05-25T21:58:42Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.2 https://en.wikipedia.org/w/index.php?title=Module:Convert_character_width&diff=1177868862&oldid=prev Pppery: Changed protection settings for "Module:Convert character width": Up to template-protection as dependency of template-protected Module:Year in various calendars ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite)) 2023-09-30T03:30:30Z <p>Changed protection settings for &quot;<a href="/wiki/Module:Convert_character_width" title="Module:Convert character width">Module:Convert character width</a>&quot;: Up to template-protection as dependency of template-protected <a href="/wiki/Module:Year_in_various_calendars" title="Module:Year in various calendars">Module:Year in various calendars</a> ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 03:30, 30 September 2023</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> Pppery https://en.wikipedia.org/w/index.php?title=Module:Convert_character_width&diff=1051978896&oldid=prev MusikBot II: Changed protection settings for "Module:Convert character width": High-risk template or module: 2783 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require administrator access] (indefinite)) 2021-10-26T17:25:20Z <p>Changed protection settings for &quot;<a href="/wiki/Module:Convert_character_width" title="Module:Convert character width">Module:Convert character width</a>&quot;: <a href="/wiki/Wikipedia:High-risk_templates" title="Wikipedia:High-risk templates">High-risk template or module</a>: 2783 transclusions (<a href="/wiki/User:MusikBot_II/TemplateProtector" title="User:MusikBot II/TemplateProtector">more info</a>) ([Edit=Require extended confirmed access] (indefinite) [Move=Require administrator access] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:25, 26 October 2021</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> MusikBot II https://en.wikipedia.org/w/index.php?title=Module:Convert_character_width&diff=570927178&oldid=prev Mr. Stradivarius: Protected Module:Convert character width: High-risk Lua module ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Block all non-admin users] (indefinite)) 2013-08-31T10:18:16Z <p>Protected Module:Convert character width: <a href="/wiki/Wikipedia:Lua/Modules" title="Wikipedia:Lua/Modules">High-risk Lua module</a> ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Block all non-admin users] (indefinite))</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <tr class="diff-title" lang="en"> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:18, 31 August 2013</td> </tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div> </td></tr></table> Mr. Stradivarius https://en.wikipedia.org/w/index.php?title=Module:Convert_character_width&diff=570153720&oldid=prev Mr. Stradivarius: check for frame variable type 2013-08-25T17:57:49Z <p>check for frame variable type</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:57, 25 August 2013</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 25:</td> <td colspan="2" class="diff-lineno">Line 25:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Converts multiple half-width characters to full-width characters.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Converts multiple half-width characters to full-width characters.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.full( frame )</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.full( frame )</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local s = frame and frame.args and frame.args[ 1 ] or frame</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local s =<ins style="font-weight: bold; text-decoration: none;"> type(</ins> frame<ins style="font-weight: bold; text-decoration: none;"> ) == 'table'</ins> and frame.args and frame.args[ 1 ] or frame</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> s = type( s ) == 'number' and tostring( s ) or s</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> s = type( s ) == 'number' and tostring( s ) or s</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( s ) ~= 'string' then return end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( s ) ~= 'string' then return end</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 33:</td> <td colspan="2" class="diff-lineno">Line 33:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Converts multiple full-width characters to half-width characters.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Converts multiple full-width characters to half-width characters.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.half( frame )</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.half( frame )</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local s = frame and frame.args and frame.args[ 1 ] or frame</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local s =<ins style="font-weight: bold; text-decoration: none;"> type(</ins> frame<ins style="font-weight: bold; text-decoration: none;"> ) == 'table'</ins> and frame.args and frame.args[ 1 ] or frame</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> s = type( s ) == 'number' and tostring( s ) or s</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> s = type( s ) == 'number' and tostring( s ) or s</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( s ) ~= 'string' then return end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if type( s ) ~= 'string' then return end</div></td> </tr> </table> Mr. Stradivarius https://en.wikipedia.org/w/index.php?title=Module:Convert_character_width&diff=570152851&oldid=prev Mr. Stradivarius: add a fixme note 2013-08-25T17:49:01Z <p>add a fixme note</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:49, 25 August 2013</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- This module converts support characters from half-width to full-width, and vice versa.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- This module converts support characters from half-width to full-width, and vice versa.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- See [[Halfwidth and fullwidth forms]] for an explanation of half- and full-width characters.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- See [[Halfwidth and fullwidth forms]] for an explanation of half- and full-width characters.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>-- @todo FIXME: Needs more characters adding, needs support for diacritic marks.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local data = mw.loadData( 'Module:Convert character width/data' )</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local data = mw.loadData( 'Module:Convert character width/data' )</div></td> </tr> </table> Mr. Stradivarius https://en.wikipedia.org/w/index.php?title=Module:Convert_character_width&diff=570152495&oldid=prev Mr. Stradivarius: create 2013-08-25T17:45:32Z <p>create</p> <p><b>New page</b></p><div>-- This module converts support characters from half-width to full-width, and vice versa.<br /> -- See [[Halfwidth and fullwidth forms]] for an explanation of half- and full-width characters.<br /> <br /> local data = mw.loadData( &#039;Module:Convert character width/data&#039; )<br /> <br /> local p = {}<br /> <br /> -- Converts one half-width character to one full-width character.<br /> local function getFull( s )<br /> return data[ s ] or s<br /> end<br /> <br /> -- Converts one full-width character to one half-width character.<br /> local function getHalf( s )<br /> for half, full in pairs( data ) do<br /> if s == full then<br /> return half<br /> end<br /> end<br /> return s<br /> end<br /> <br /> -- Converts multiple half-width characters to full-width characters.<br /> function p.full( frame )<br /> local s = frame and frame.args and frame.args[ 1 ] or frame<br /> s = type( s ) == &#039;number&#039; and tostring( s ) or s<br /> if type( s ) ~= &#039;string&#039; then return end<br /> return ( mw.ustring.gsub( s, &#039;.&#039;, getFull ) )<br /> end<br /> <br /> -- Converts multiple full-width characters to half-width characters.<br /> function p.half( frame )<br /> local s = frame and frame.args and frame.args[ 1 ] or frame<br /> s = type( s ) == &#039;number&#039; and tostring( s ) or s<br /> if type( s ) ~= &#039;string&#039; then return end<br /> return ( mw.ustring.gsub( s, &#039;.&#039;, getHalf ) )<br /> end<br /> <br /> return p</div> Mr. Stradivarius