Modify

Opened 7 years ago

Closed 7 years ago

#13048 closed enhancement (fixed)

Allow browser and repos aliases for source

Reported by: Ryan J Ollos Owned by: Peter Suter
Priority: normal Component: WikiAutoCompletePlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Would it be possible to add the browser and repos aliases for source?: TracLinks#VersionControlrelatedlinks.

There may also be other aliases that could be added in process_request.

Attachments (1)

t13048.diff (2.0 KB) - added by Ryan J Ollos 7 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 in reply to:  description ; Changed 7 years ago by Peter Suter

Replying to rjollos:

Would it be possible to add the browser and repos aliases for source?: TracLinks#VersionControlrelatedlinks.

Sure, I only added what I typically use myself. But patch welcome. :)

There may also be other aliases that could be added

The only other alias documented o TracLinks seems to be bug:. (But wasn't there also issue:?)

in process_request.

Wouldn't adding them to the Javascript match regexes be enough?

comment:2 in reply to:  1 Changed 7 years ago by Peter Suter

(But wasn't there also issue:?)

Ah that's new in Trac 1.2: t:ticket:12192

Changed 7 years ago by Ryan J Ollos

Attachment: t13048.diff added

comment:3 Changed 7 years ago by Ryan J Ollos

My JavaScript skills are pretty mediocre, but here's a first attempt at a patch: t13048.diff.

comment:4 Changed 7 years ago by Ryan J Ollos

I forgot to include in patch, bump version to 1.2.

comment:5 Changed 7 years ago by Peter Suter

Thanks for the patch. However I don't think the version test for issue: is worth it. Sorry for the wasted effort. (Also it would fail for Trac 2.0 ;)) So I propose just going with this:

  • wikiautocomplete.js

     
    164164        },
    165165
    166166        { // Tickets
    167             match: /((?:^|[^{])#|\bticket:)(\d*)$/,
     167            match: /((?:^|[^{])#|\bticket:|\bbug:|\bissue:)(\d*)$/,
    168168            search: search('ticket'),
    169169            index: 2,
    170170            template: function (ticket, term) {
     
    208208        },
    209209
    210210        { // Source
    211             match: /\b(source:|log:)([^@\s]*(?:@\S*)?)$/,
     211            match: /\b(source:|browser:|repos:|log:)([^@\s]*(?:@\S*)?)$/,
    212212            search: search('source'),
    213213            index: 2,
    214214            template: template,
Last edited 7 years ago by Peter Suter (previous) (diff)

comment:6 Changed 7 years ago by Ryan J Ollos

In case you are waiting for me before committing, I have no preference. I just want to have the aliases available and hope to have trac-hacks.org on Trac release 1.2 soon.

comment:7 Changed 7 years ago by Peter Suter

Resolution: fixed
Status: newclosed

Thanks, committed in r16221.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Peter Suter.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.