Look how subst: works in the braceSubstitution function in Parser.php.
Basically, do this: if ( $parser->ot['wiki'] ) { /* do your stuff */ }.
On Sat, Nov 14, 2015 at 5:36 PM, Purodha Blissenbach <
purodha(a)blissenbach.org> wrote:
Hi,
I want to implement something similar to ~~~~ expansion or the pipe-trick
in internal links in an extension.
That is, I need to execute code
- on save and preview only,
- on wikitext ony,
- on page content only,
- before the pre-save-parser treats links in the wikitext,
- altering the wikitext of the page.
I tried several hooks and ideas, but was unable to make it specific enough.
Help is appreciated.
Thank you.
Purodha
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l