12,656
editsno edit summary
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Checks whether the tag named <code>TAG</code> occurs within <code>WIKITEXT</code>. Returns the position of the tag if found, empty otherwise. | Checks whether the tag named <code>TAG</code> occurs within <code>WIKITEXT</code>. Returns the position of the tag if found, empty otherwise. | ||
Example: <code><nowiki>{{#invoke:HasTag | main | | Example: <code><nowiki>{{#invoke:HasTag | main | nowiki | Blah <nowiki>blep</nowiki> blub. }}</nowiki></code> | ||
Result: {{#invoke:HasTag | main | | Result: {{#invoke:HasTag | main | nowiki | Blah <nowiki>blep</nowiki> blub. }} | ||
( | Note: This only works with parser tags, not HTML tags. For example, it wouldn't work with <code><div></code> or <code><code></code>, but it works with <code><gallery></code> or <code><nowiki></code>. (HTML tags can be searched for with regular parser string functions.) |