Hi,
Any thoughts about changing the parser so it works in two steps? first, parse the wiki text to create a dom like structure of elements (you can have TemplateCallElement, InternalLinkElement etc.), then, traverse the tree, calling tag or function hooks. this will allow much more powerful extensions.
Also, i think it will allow better handling of special characters. By not using regular expressions, and creating a tree of elements, special characters can be escaped naturally (quoted, or with '').
Thanks, Ittay