Difference between revisions of "Module:Sandbox/Luis150902/cleanup/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Renamed user awfwvowjvwrvnwio
(Add documentation and testcases)
 
blackwiki>Renamed user awfwvowjvwrvnwio
(Cleanup)
Line 3: Line 3:
 
== Usage ==
 
== Usage ==
  
<code><nowiki>{{</nowiki>#invoke:Sandbox/Luis150902/cleanup|main|''string''}}</code>, where ''string'' is the string to be escaped. This eases the editing of wiki markup containing bidirectional text. Inserting <code>&#38;&#35;61&#59;</code> (escaped form of &#61;) is displayed as <code>&#59;61&#35;&#38;</code> between right-to-left characters.
+
<code><nowiki>{{</nowiki>#invoke:Sandbox/Luis150902/cleanup|main|''string''}}</code>, where ''string'' is the string to be escaped. This eases the editing of wiki markup containing bidirectional text. Inserting <code>&#38;&#35;61&#59;</code> (escaped form of <code>{{=}}</code>) is displayed as <code>&#59;61&#35;&#38;</code> between right-to-left characters.
  
Test 1: {{#invoke:Sandbox/Luis150902/cleanup|A}} returned <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-0">Script error: The function &quot;A&quot; does not exist.</span></strong>
+
* Test 1: {{#invoke:Sandbox/Luis150902/cleanup|main|A}} returned {{#invoke:Sandbox/Luis150902/cleanup|main|A}}
Test 2: {{#invoke:Sandbox/Luis150902/cleanup|B}} returned <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-1">Script error: The function &quot;B&quot; does not exist.</span></strong>
+
* Test 2: {{#invoke:Sandbox/Luis150902/cleanup|main|B}} returned {{#invoke:Sandbox/Luis150902/cleanup|main|B}}
Test 3: {{#invoke:Sandbox/Luis150902/cleanup|א}} returned <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-2">Script error: The function &quot;א&quot; does not exist.</span></strong>
+
* Test 3: {{#invoke:Sandbox/Luis150902/cleanup|main|א}} returned &#x05d0
Test 4: {{#invoke:Sandbox/Luis150902/cleanup|אתבש}} returned <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-3">Script error: The function &quot;אתבש&quot; does not exist.</span></strong> (Atbash)
+
* Test 4: {{#invoke:Sandbox/Luis150902/cleanup|main|אתבש}} returned &#x05d0&#x05ea&#x05d1&#x05e9 (Atbash)
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Revision as of 22:40, 6 January 2017

Usage

{{#invoke:Sandbox/Luis150902/cleanup|main|string}}, where string is the string to be escaped. This eases the editing of wiki markup containing bidirectional text. Inserting &#61; (escaped form of =) is displayed as ;61#& between right-to-left characters.

  • Test 1: A returned A
  • Test 2: B returned B
  • Test 3: א returned &#x05d0
  • Test 4: אתבש returned &#x05d0&#x05ea&#x05d1&#x05e9 (Atbash)