Erwin Jurschitza wrote:
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.
That will break quite a few things on en, for example succession boxes, where they do something like this: {{table start}} {{succession|some position}} {{succession|some other position}} {{succession|yet some other position}} {{table end}}
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]]
I do support #2, but not #1. Should be not overly complicated.
Basically, I agree with you though; Templates everywhere gets awfully messy.
Magnus