Modify

Opened 8 years ago

Closed 14 months ago

Last modified 9 months ago

#3591 closed enhancement (fixed)

Include macro doesn't work with relative wiki links

Reported by: jimse Owned by: hasienda
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by rjollos)

From a wiki page called "Parent":

This works: [[Include(Parent/Child)]]

This doesn't work: [[Include(Child)]]

Attachments (2)

20140828_resolve-relative-wiki-links.patch (4.3 KB) - added by hasienda 2 years ago.
proposed patch for adding relative wiki page resolution for wiki page includes
20140828_includemacro_pep8.patch (7.4 KB) - added by hasienda 2 years ago.
some PEP8 and nit-picking on doc-string and comment style

Download all attachments as: .zip

Change History (14)

comment:2 Changed 4 years ago by rjollos

  • Description modified (diff)

comment:3 Changed 3 years ago by rjollos

  • Owner changed from coderanger to rjollos
  • Status changed from new to assigned

comment:4 Changed 2 years ago by hasienda

This has been requested on the mailing list again recently.

Btw, the example in the description is bogus, because scoped wiki link resolution in Trac core searches siblings of the current page, and then looks upwards on the path, never downwards, as suggested.

Changed 2 years ago by hasienda

proposed patch for adding relative wiki page resolution for wiki page includes

comment:5 Changed 2 years ago by hasienda

Note: I've shortened the code by using existing _split_path function to extract optional wiki page version too, what is unrelated to the solution.

Changed 2 years ago by hasienda

some PEP8 and nit-picking on doc-string and comment style

comment:6 Changed 2 years ago by hasienda

The second patch just proposes some code clean-up, especially shortening line length in multiple places. Apply at as you like.

comment:7 Changed 2 years ago by rjollos

Thanks for the patches. Feel free to push your changes and I'll do a retrospective review when I have some time.

comment:8 Changed 2 years ago by hasienda

In 14141:

IncludeMacro: Resolve relative wiki page references, refs #3591.

comment:9 Changed 14 months ago by rjollos

In 14801:

3.0.0dev: PEP-0008 changes. Refs #3591.

Patch by hasienda.

comment:10 Changed 14 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

Changes work well. Thanks!

comment:11 Changed 14 months ago by rjollos

  • Owner changed from rjollos to hasienda

comment:12 Changed 14 months ago by rjollos

  • Type changed from defect to enhancement

comment:13 Changed 9 months ago by rjollos

In 15105:

3.0.0dev: Format to PEP8

Refs #3591.

Add Comment

Modify Ticket

Action
as closed The owner will remain hasienda.
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.