Ticket #10612 (closed defect: duplicate)

Opened 6 months ago

Last modified 1 week ago

WikiLinks using square brackets fails in certain cases

Reported by: ross@mayfirst.org Assigned to: 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

t10612-r12165-1.patch (2.2 kB) - added by rjollos on 11/24/12 00:33:54.

Change History

11/14/12 22:40:16 changed by rjollos

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

11/24/12 00:33:54 changed by rjollos

  • attachment t10612-r12165-1.patch added.

11/24/12 00:35:30 changed 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.

(follow-up: ↓ 4 ) 05/14/13 23:55:11 changed by hasienda

  • status changed from new to closed.
  • resolution set to duplicate.

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.

(in reply to: ↑ 3 ; follow-up: ↓ 5 ) 05/15/13 00:14:18 changed 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.

(in reply to: ↑ 4 ; follow-up: ↓ 6 ) 05/15/13 01:32:04 changed 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.

(in reply to: ↑ 5 ) 05/15/13 01:47:47 changed 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?

05/15/13 01:53:04 changed by hasienda

Exactly.


Add/Change #10612 (WikiLinks using square brackets fails in certain cases)




Change Properties
Action