Modify

Opened 3 years ago

Last modified 7 months ago

#9537 accepted enhancement

Only Include a Section of a wikipage or a regular expression match

Reported by: suddani@… Owned by: rjollos
Priority: high Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

This Patch allows you to include a Section(with all its subsections) into another wiki page with:

[[Include(wiki:Page#Section)]]

and it allows you to match for regular expressions in a wiki page and only include those like:

[[Include(wiki:Page@/== Section ==(.*?)==/)]]

it than returns the first saved group of the regular expression in this case everything inside the Section with name "Section" but without its subsections.

Attachments (1)

includeSectionOnlyPatch.diff (3.2 KB) - added by suddani@… 3 years ago.
IncludeSectionPatch

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by suddani@…

IncludeSectionPatch

comment:1 Changed 3 years ago by anonymous

I vote for this to be added to master.

comment:2 Changed 3 years ago by anonymous

I retract that statement because I was unable to get the patch to work...

comment:3 Changed 2 years ago by rjollos

#8972 and #3882 closed as duplicates. The higher numbered ticket is being retained since it has a patch.

comment:4 Changed 8 months ago by rjollos

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

comment:5 Changed 8 months ago by Markus Vuori <markus@…>

This would be really nice. Badly needed. :)

comment:6 Changed 7 months ago by rjollos

I'm pretty busy working on other Trac-related things, but if you can test the patch and provide feedback, that would be a good start to getting it incorporated.

comment:7 Changed 7 months ago by Markus Vuori <markus@…>

I didn't manage to apply the patch to the newest version of includemacro. The first two hunks were succesful and two latter ones unsuccesful.

comment:8 Changed 7 months ago by rjollos

  • Status changed from assigned to accepted

Add Comment

Modify Ticket

Action
as accepted .
Author


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

 
Note: See TracTickets for help on using tickets.