Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 5 years ago

#1967 closed enhancement (fixed)

Adding Source Links With Spaces

Reported by: brandon@… Owned by: Christian Boos
Priority: normal Milestone: 0.9
Component: wiki system Version: 0.8.4
Severity: normal Keywords: source link wiki space
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Someone in the SVN repository I work on added a directory name which has a space in it. I'm unable to find a way to do a source: link to this directory in the Wiki. I've tried doing the following links:

source:project/space here source:project/space here/ source:"project/space here" source:"project space here/"

Is this just a user training issue, or maybe just something that hasn't been addressed before?

Thanks,

  • Brandon

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 19 years ago

Milestone: 0.9
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

As you can see by yourself (in the description), it works now for Trac 0.9.

The only thing that currently won't work is spaces within identifiers in the link with description form:

[source:"project/space here" Look there].

renders as: Look there.

Should I add this, or was there a reason not to have it?

  • formatter.py

     
    138138                  r"(?P<inlinecode2>!?`(?P<inline2>.*?)`)",
    139139                  r"(?P<htmlescapeentity>!?&#\d+;)"]
    140140    _post_rules = [r"(?P<shref>!?((?P<sns>\w+):(?P<stgt>'[^']+'|\"[^\"]+\"|((\|(?=[^| ])|[^| ])*[^|'~_\., \)]))))",
    141                    r"(?P<lhref>!?\[(?P<lns>\w+):(?P<ltgt>[^\] ]+)(?: (?P<label>.*?))?\])",
     141                   r"(?P<lhref>!?\[(?P<lns>\w+):(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\] ]+)(?: (?P<label>.*?))?\])",
    142142                   r"(?P<macro>!?\[\[(?P<macroname>[\w/+-]+)(\]\]|\((?P<macroargs>.*?)\)\]\]))",
    143143                   r"(?P<heading>^\s*(?P<hdepth>=+)\s.*\s(?P=hdepth)\s*$)",
    144144                   r"(?P<list>^(?P<ldepth>\s+)(?:\*|\d+\.) )",
     
    269269    def _lhref_formatter(self, match, fullmatch):
    270270        ns = fullmatch.group('lns')
    271271        target = fullmatch.group('ltgt')
     272        if target[0] in "'\"":
     273            target = target[1:-1]
    272274        label = fullmatch.group('label') or target
    273275        return self._make_link(ns, target, match, label)

comment:2 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

Added the previous change in r2134.

in reply to:  description ; comment:3 by anonymous, 5 years ago

Replying to brandon@…:

Someone in the SVN repository I work on added a directory name which has a space in it. I'm unable to find a way to do a source: link to this directory in the Wiki. I've tried doing the following links:

source:project/space here source:project/space here/ source:"project/space here" source:"project space here/"

Is this just a user training issue, or maybe just something that hasn't been addressed before?

Thanks,

  • Brandon

It looks like it is still (trac 1.2.3) a problem to have directories or files with spaces in their name.

in reply to:  3 comment:4 by Ryan J Ollos, 5 years ago

Replying to anonymous:

It looks like it is still (trac 1.2.3) a problem to have directories or files with spaces in their name.

You need to quote paths containing whitespace: [source:"dir with space/file with space"]. See TracLinks#QuotingspaceinTracLinks. If you have further questions, please ask on the MailingList.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.