Modify

Opened 6 years ago

Last modified 4 months ago

#3591 assigned defect

Include macro doesn't work with relative wiki links

Reported by: jimse@… Owned by: rjollos
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 4 months ago.
proposed patch for adding relative wiki page resolution for wiki page includes
20140828_includemacro_pep8.patch (7.4 KB) - added by hasienda 4 months ago.
some PEP8 and nit-picking on doc-string and comment style

Download all attachments as: .zip

Change History (9)

comment:2 Changed 3 years ago by rjollos

  • Description modified (diff)

comment:3 Changed 12 months ago by rjollos

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

comment:4 Changed 4 months 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 4 months ago by hasienda

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

comment:5 Changed 4 months 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 4 months ago by hasienda

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

comment:6 Changed 4 months 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 4 months 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 4 months ago by hasienda

In 14141:

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

Add Comment

Modify Ticket

Action
as assigned The owner will remain rjollos.
Author


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

 
Note: See TracTickets for help on using tickets.