Modify

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#10612 closed defect (duplicate)

WikiLinks using square brackets fails in certain cases

Reported by: ross@… Owned by: Steffen Hoffmann
Priority: normal Component: TagsPlugin
Severity: normal Keywords: wikilinks
Cc: Trac Release: 0.12

Description

When using the tags plugin and entering a reference to a tag using square brackets, in some cases this fails. Currently if you enter the following syntax:

[tag:tagname]

The tag will fail to render correctly. However the following syntax works:

[tag:tagname ]
or
[tag:tagname tagname]

~/ross

Attachments (1)

t10612-r12165-1.patch (2.2 KB) - added by Ryan J Ollos 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by Ryan J Ollos

I can reproduce with r12165 (the latest) version of the trunk and Trac 0.12.3.

Changed 12 years ago by Ryan J Ollos

Attachment: t10612-r12165-1.patch added

comment:2 Changed 12 years ago by Ryan J Ollos

This ticket interested me because I've previously ([11689]) tried to make use of trac.wiki.tests.formatter in order to setup tests for the wiki formatter (and would also like to utilize the module when making tests for PlantUmlMacro). This patch gets closer to that, however I'm still running into an issue in which I can't activate a component in the environment. The only way I can get tractags enabled is to recreate the environment (note: formatter_setup gets called after the environment is created in the trac.wiki.tests.formatter.WikiTestCase constructor).

The patch also resolves the issue reported in this ticket, and cleans up the regex.

comment:3 Changed 11 years ago by Steffen Hoffmann

Resolution: duplicate
Status: newclosed

Ryan, thanks for providing the patch.

I'll follow it loosely, but especially won't rely on the import from trac.wiki.tests. Rather easy to provide a minimal formatter.py in this plugin for not requiring a full Trac developer setup to run these unit tests.

But the issue is essentially a duplicate of #9630. Please follow-up overthere as required.

comment:4 in reply to:  3 ; Changed 11 years ago by Ryan J Ollos

Replying to hasienda:

I'll follow it loosely, but especially won't rely on the import from trac.wiki.tests. Rather easy to provide a minimal formatter.py in this plugin for not requiring a full Trac developer setup to run these unit tests.

Is it possible to run the unit tests without a Trac developer setup anyway? The test harness in [13129] imports from trac.test, and I can't see how that would be available in any case that trac.wiki.tests is not.

comment:5 in reply to:  4 ; Changed 11 years ago by Steffen Hoffmann

Replying to rjollos:

Replying to hasienda:

I'll follow it loosely, but especially won't rely on the import from trac.wiki.tests. Rather easy to provide a minimal formatter.py in this plugin for not requiring a full Trac developer setup to run these unit tests.

Is it possible to run the unit tests without a Trac developer setup anyway? The test harness in [13129] imports from trac.test, and I can't see how that would be available in any case that trac.wiki.tests is not.

While trac/test.py is packaged, all the trac/*/tests/ are not. So the answer is Yes, what I've seen in my test environments for a long time, because I did not install Trac from source/with deploy in there - just regular easy-install setups.

comment:6 in reply to:  5 Changed 11 years ago by Ryan J Ollos

Replying to hasienda:

While trac/test.py is packaged, all the trac/*/tests/ are not.

I see. It must be due to the exclude glob passed to find_packages?

comment:7 Changed 11 years ago by Steffen Hoffmann

Exactly.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
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.