Steve Bennett wrote:
Here's a controversial proposal: allow external
links to be wrapped in
double brackets: [[
http://foo.com]].
Rationale: My grammar (and the existing parser, I believe) have to go
out of their way to detect these malformed external links, then
explicitly treat them as a normal external link wrapped in extra
brackets:
[<a href="http://foo.com">[1]</a>]
However, what the user almost certainly wanted was:
<a href="http://foo.com">[1]</a>
So this is a case of existing wikitext probably being written with a
different intention to how the parser is actually rendering it.
Since we have to explicitly detect this situation, wouldn't it make
more sense to render it how the user wants it while we're at it?
Steve
PS This is a somewhat idle query - compared to the amount of work
involved in rewriting the parser, this is a trivial change either way.
I'm just curious what kinds of improvements could be made that fit
within the "don't break existing wikitext"/"mimic what people are
expecting" guidelines.
Would fit the expectatives. It's a commons mistake among beginners.
However, not only they have a different syntax for brackets, also for
separators. So if you "fixed" it, you could end up making a link as <a
href="http://www.example.org/|Nice">site</a>
Also, it would further restrict available pagenames: Things like
http://en.wikipedia.org/wiki/Http://www.google.com *do* exist!
It is however an interesting proposal, as you wouldn't need to recognise
[http:// links at all. You would simply define http: as a special
namespace linking to that page (same with ftp:, mailto:...).