Minute Electron schrieb:
I feel that it would be benefititial to MediaWiki (and this problem) to
have
a discussion and consultation about rewriting wikitext. Currently there
are
many ambiuties that a specification would solve.
Those are both interesting points. I'd like to divide that into two distinct thoughts, if I could:
1) Writing a spec on how wikitext works _today_ 2) Writing a spec on how wikitext should work _in the future_
The former has been addressed many times on this list, and although I think it's a valuable endeavor, I hope to set it outside the scope of this discussion. Here, I hope merely to talk about the latter, limited only to template language processing.
Thomas Dalton schrieb:
But should {{{{a}}}} be parsed as {{ {{a}} }} or { {{ {a} }} } or { {{{a}}} } or {{{ {a} }}}? Depending on context, any of those could be intended.
Those are fair questions - and maybe that's the answer. I tend to think that there should be a defined default case, with the others being achievable by other means.
Of the cases you mention, two seem very unlikely to me: { {{ {a} }} } since it relies on a template with curly braces in the name (not sure if this is allowed) and {{{ {a} }}} since it would require a parameter with a pair of curly braces in its name. I'd think this would be very unlikely - and currently isn't even possible.
The other option: { {{{a}}} } seems like it may have been what was intended in some cases. Especially if you define triples as being especially closely bound.
One thing which I had been taking for granted was the idea that there _should_ be a way to interpret most encountered strings - and that the system should tend towards functionality when a reasonable interpretation is available.
The other way to approach the problem is to not make assumptions about what the text means and throw up our hands when ambiguity arises. It would seem this is the way the system works today. Is this the right way?
I think not parsing it at all and leaving it as text is the only option - at least that way it is obvious what has gone wrong.
Well, not as obvious as a nice fat parse error would be. :)
-- Jim
On 7/3/07, Thomas Dalton thomas.dalton@gmail.com wrote:
But should {{{{a}}}} be parsed as {{ {{a}} }} or { {{ {a} }} } or { {{{a}}} } or {{{ {a} }}}? Depending on context, any of those could be intended. I think not parsing it at all and leaving it as text is the only option - at least that way it is obvious what has gone wrong.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l