≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #1208

Feature request #1208: Allow relative links in square brackets

Kind feature request
Product wikitext
When Created 2009-01-25T14:49:41Z, updated 2009-02-02T16:32:03Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

As noted in "List of wiki redirects", it might be nice if you could use the [http://example.com/ link] syntax with relative rather than absolute URLs (ie. [/issues/new ticket].

Not sure whether this is a good idea of not, so will need to think about it. One of the nice things about the extension is that it has very few such exceptions and is very strict about what it will turn into a link. This means that you can type stuff like [sic] without having to worry about the parser thinking you were trying to make a link.

One of the existing exceptions I currently have in place is that [[issues/1|issue # 1]] would get turned into a link to /issues/1 (curiously though [[issues/new|hello]] would not). I don't necessarily like this exception, and I can't remember right now why I decided to limit it to such a strict regex, /\A[a-z]+\/\d+\z/ (probably because I had wiki article titles in the old MediaWiki installation that had slashes in them -- something that you can't have in this Rails version because of the way Rails handles routes -- and I wanted to avoid false positives).

Perhaps it would be better to replace that exception with the one that's being proposed in this ticket (ie. [/issues/1|issue # 1]). Then I could use a much nicer regex and I also wouldn't need to worry about false positives.

Comments

  1. Greg Hurrell 2009-01-25T14:52:08Z

    Status changed:

    • From: New
    • To: Open
  2. Greg Hurrell 2009-02-01T16:10:32Z

    Ok, this is now implemented and the design looks much nicer.

  3. Greg Hurrell 2009-02-02T16:31:50Z

    Out in the just-released wikitext 1.4.0.

  4. Greg Hurrell 2009-02-02T16:32:03Z

    Status changed:

    • From: Open
    • To: Closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets