Edgewall Software

Opened 18 years ago

Last modified 17 years ago

#3096 closed defect

Wiki-Links like wiki:pagename are not displayed as pagename — at Version 3

Reported by: claudius.link@… Owned by: Christian Boos
Priority: normal Milestone:
Component: wiki system Version: 0.9.5
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

Wiki-Links like wiki:pagename are not displayed as !pagename but rather as wiki:pagename.

IMHO "wiki:pagename" in the wiki text should be displayed as "pagename".

Example:

wiki:pagename should look like pagename but doesn't.

Solution: pass target instead of match as the last argument to _make_link in _shref_formatter (trac/wiki/formatter.py).

See attached patch

Change History (5)

by claudius.link@…, 18 years ago

Attachment: shref_formater.patch added

comment:1 by claudius.link@…, 18 years ago

Carefull the patch "breaks" full URL links

Example: http://projects.edgewall.com is than dispayed as //projects.edgewall.com

Internally the URL is still correct and works like before.

comment:2 by Alec Thomas, 18 years ago

Note that you can achieve the result you want with [wiki:pagename].

comment:3 by Christian Boos, 18 years ago

Description: modified (diff)
Owner: changed from Jonas Borgström to Christian Boos

As athomas said, when using [wiki:pagename], only pagename is displayed.

When using wiki:pagename, currently wiki:pagename is displayed as well, which is not so nice. It would look better if the ":" would simply be omitted, in this case.

That would be especially nice when writing things like:

That's a new feature of Trac in milestone:0.10

which currently renders as:

That's a new feature of Trac in milestone:0.10

and with the proposed change would render as:

That's a new feature of Trac in milestone 0.10

The implementation should take care of not breaking the http://... links, see attachment:keep_local_ns.diff

by Christian Boos, 18 years ago

Attachment: keep_local_ns.diff added

Omit the ":" when displaying non-labelled TracLinks (e.g. milestone:0.10milestone 0.10)

Note: See TracTickets for help on using tickets.