Difference between revisions of "Template:RemoveHTMLContainers"

From ChatWars Wiki
Jump to: navigation, search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
{{#sub: {{{string|}}}
+
-->{{#vardefine: string | {{ReplaceNumericCharEncoding| string = {{{string|}}} }} }}{{#sub: {{#var: string}}
 
   | {{#vardefineecho: startStr
 
   | {{#vardefineecho: startStr
       | {{#expr: {{#pos: {{{string|}}} <!-- Find closing bracket ">" of LAST span opening tag (first closing bracket after offset from start of last opening bracket) -->
+
       | {{#expr: {{#pos: {{#var: string}} <!-- Find closing bracket ">" of LAST span opening tag (first closing bracket after offset from start of last opening bracket) -->
 
                   | >
 
                   | >
                   | {{#rpos: {{{string|}}} <!-- Find LAST span opening tag-->
+
                   | {{#ifeq: {{#rpos: {{#var: string}} | <span }} | -1
                      | <span
+
                      | 0
 +
                      | {{#rpos: {{#var: string}} | <span }} <!-- Find LAST span opening tag-->
 
                     }}
 
                     }}
                 }} + 0 <!-- correct off by one error in the beginning of the string -->
+
                 }} + 1 <!-- correct off by one error in the beginning of the string -->
 
         }}
 
         }}
 
     }}
 
     }}
Line 15: Line 16:
 
             }} - {{#var: startStr}}
 
             }} - {{#var: startStr}}
 
     }}
 
     }}
}}
+
}}</includeonly><noinclude>
</includeonly><noinclude>
 
 
Remove the fucking spa(n/m) containers #ask queries wrap around results making them impossible to use as variables for later computation
 
Remove the fucking spa(n/m) containers #ask queries wrap around results making them impossible to use as variables for later computation
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Latest revision as of 05:56, 21 March 2019

Remove the fucking spa(n/m) containers #ask queries wrap around results making them impossible to use as variables for later computation