Gregory Maxwell:
My thought is that if we consider the parse tree of wikitext it should be that templates should only be able to affect a subtree under the node where they are included, not make changes to the syntax at their level or above.
Fully agreed. I found some pages on dewiki a while ago and corrected them.
I.e. you should be able to completely parse the wikitext, then go in and insert subtrees at the templates and not change anything else.
There are at least two more problems complicating the building of a sane parse tree:
- templates may be nested inside tags, e.g. <table {{Prettytable}}> {| {{Prettytable}} - variables may be used inside tags, see [1] [[Image:Chs2_{{{2}}}d40.png|{{{65}}}px]]
Erwin Jurschitza (de:Benutzer:Vlado)