Modify

Opened 16 years ago

Closed 9 years ago

Last modified 8 years ago

#3591 closed enhancement (fixed)

Include macro doesn't work with relative wiki links

Reported by: Jim Sermersheim Owned by: Steffen Hoffmann
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

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 Steffen Hoffmann 10 years ago.
proposed patch for adding relative wiki page resolution for wiki page includes
20140828_includemacro_pep8.patch (7.4 KB) - added by Steffen Hoffmann 10 years ago.
some PEP8 and nit-picking on doc-string and comment style

Download all attachments as: .zip

Change History (14)

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 10 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Ryan J Ollos
Status: newassigned

comment:4 Changed 10 years ago by Steffen Hoffmann

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 10 years ago by Steffen Hoffmann

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

comment:5 Changed 10 years ago by Steffen Hoffmann

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 10 years ago by Steffen Hoffmann

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

comment:6 Changed 10 years ago by Steffen Hoffmann

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

comment:7 Changed 10 years ago by Ryan J Ollos

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 10 years ago by Steffen Hoffmann

In 14141:

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

comment:9 Changed 9 years ago by Ryan J Ollos

In 14801:

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

Patch by hasienda.

comment:10 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

Changes work well. Thanks!

comment:11 Changed 9 years ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to Steffen Hoffmann

comment:12 Changed 9 years ago by Ryan J Ollos

Type: defectenhancement

comment:13 Changed 8 years ago by Ryan J Ollos

In 15105:

3.0.0dev: Format to PEP8

Refs #3591.

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.