We've been discussing the problem that everything is valid in Wikitext,
meaning that even the wild code noted by Steve Bennett:
Try this:
[[Foo|<pre>Magic link!</pre>]]
(for extra points try and predict what will happen first...)
This one is less exciting, but also odd:
[[Foo|Not what I <gallery>Image:foo.jpg</gallery> expected...]]
...comes out as SOMETHING. As he noted however, it's highly unexpected.
People have suggested that we output error messages instead of unexpected
results (me included) but I have changed my mind as this is clearly user
unfriendly.
What I think we should do instead is just alter the parser to output things
more intuitively. This move would directly break current usage, BUT ONLY IN
CASES OF *UNEXPECTED OUTPUT*. The breakage would only be on the kinds of
output no one intends ANYWAY.
The kind of thing I'm talking about is rendering:
;Life, The Universe and Everything:
:Forty Two
correctly (i.e. a definition title with a colon at the end, followed by the
definition, rather than being followed by an empty definition). There are a
large number of other tweaks we could make which, if made, would only
improve rendering - they would eliminate the cases where unexpected results
are arrived at.
Because ultimately that's what we're talking about. We want to eliminate
unexpected results, and we've suggested swapping them out for error
messages. Why not just swap them out for expected results?
P.S. In the case of something like [[Foo:Bar|Baz<pre>Foo</pre>Bar]] the
syntax should either be taken as so wrong that it outputs literally, or,
highly preferred, it should work out that the user is very likely trying to
attempt the equivalent of the following:
[[Foo:Bar|Baz]]<pre>[[Foo:Bar|Foo]]</pre>[[Foo:Bar|Bar]]