Talk:Markup spec/BNF/Links

Jump to navigation Jump to search

I made two changes yesterday, which were reverted.

  1. I removed the <whitespace> between the URL & anchor text, since one of the suprirsing (to me) features of mediawiki is you don't whitespace to seperate them. Even this document was incorrect.
  2. I embedded the terminal "[" & "]" diretly into the rule. I'm not sure why there's a benefit to putting these in their own rule.

Anyway, I was more concerned about the doc being incorrect that slightly harder to read, so I restored the importatn part of the edit. -Sanbeg 17:43, 10 August 2006 (UTC)

  1. The whitespace must be required, otherwise how does the parser know when the link ends and the description begins? For example, the following are not equivalent: [ microsoft] and []
    • It uses a regular expression to see what is a valid URL, whether or not the URL is in []'s. If a URL is in []s, and anything other than whitespace follows the URL, it is anchor text; i.e. microsoft. Weird, but I think the weirdness in mediwiki is why a document like this is useful. I think the question is how much to document it. It seems more like a bug that would now need to be supported to keep from breaking existing code, but writing about it too much may encourage people to actually write awful links like that. -Sanbeg 15:50, 11 August 2006 (UTC)
      That's a good point. I guess we should decide whether these pages are describing the current syntax, or defining the desired syntax. However, if it is decided that the 'bug' should be kept for compatibility, then we need to describe it here in either case. --HappyDog 16:16, 11 August 2006 (UTC)
  2. The reason for leaving the terminals as separate rules was partly as an aid to writing translation rules (which may not only be HTML translation), and partly for clarity - it explains that "[" is the markup for opening an external link tag, which may not be clear in your version. --HappyDog 23:48, 10 August 2006 (UTC)

Any length limit for URLs?[edit]

Some clarification would be useful. It seems that at least this source is familiar with problems using extremely long URLs. I've been looking for something concrete discussing the problem in the wiki context but haven't located it yet. One user on en: wants to use the following, which seems like an invitation to trouble, not to mention being hostile to screenreaders. World Economic Outlook Database, April 2009 Cheers, LeadSongDog 18:49, 1 May 2009 (UTC)