Difference between revisions of "Template:RemoveHTMLContainers"

From ChatWars Wiki
Jump to: navigation, search
(beginning of de-fucking of #ask spa(n/m) containers)
 
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><!--
{{#sub: {{{string|}}} | {{#pos: {{{string|}}} | <span class="smw-value">
+
-->{{#vardefine: string | {{ReplaceNumericCharEncoding| string = {{{string|}}} }} }}{{#sub: {{#var: string}}
</includeonly><noinclude>
+
  | {{#vardefineecho: startStr
 +
      | {{#expr: {{#pos: {{#var: string}} <!-- Find closing bracket ">" of LAST span opening tag (first closing bracket after offset from start of last opening bracket) -->
 +
                  | >
 +
                  | {{#ifeq: {{#rpos: {{#var: string}} | <span }} | -1
 +
                      | 0
 +
                      | {{#rpos: {{#var: string}} | <span }} <!-- Find LAST span opening tag-->
 +
                    }}
 +
                }} + 1 <!-- correct off by one error in the beginning of the string -->
 +
        }}
 +
    }}
 +
  | {{#expr: {{#pos: {{{string|}}} <!-- find first opening bracket "<" of first closing tag of span containers-->
 +
              | <
 +
              | {{#var: startStr}}
 +
            }} - {{#var: startStr}}
 +
    }}
 +
}}</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