Modify

Opened 23 months ago

Closed 17 months ago

Last modified 17 months ago

#10612 closed defect (duplicate)

WikiLinks using square brackets fails in certain cases

Reported by: ross@… Owned by: hasienda
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 rjollos 23 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 23 months ago by rjollos

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

Changed 23 months ago by rjollos

comment:2 Changed 23 months ago by rjollos

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 follow-up: Changed 17 months ago by hasienda

  • Resolution set to duplicate
  • Status changed from new to closed

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 ; follow-up: Changed 17 months ago by 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.

comment:5 in reply to: ↑ 4 ; follow-up: Changed 17 months ago by hasienda

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 17 months ago by rjollos

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 17 months ago by hasienda

Exactly.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.