Difference between revisions of "Template:RemoveHTMLContainers"
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly><!-- |
− | {{# | + | -->{{#vardefine: string | {{ReplaceNumericCharEncoding| string = {{{string|}}} }} }}{{#sub: {{#var: string}} |
| {{#vardefineecho: startStr | | {{#vardefineecho: startStr | ||
− | | {{#expr: {{#pos: {{ | + | | {{#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| | + | | {{#ifeq: {{#rpos: {{#var: string}} | <span }} | -1 |
− | + | | 0 | |
+ | | {{#rpos: {{#var: string}} | <span }} <!-- Find LAST span opening tag--> | ||
}} | }} | ||
− | }} + 1 | + | }} + 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