Modify

Opened 3 years ago

Last modified 8 months ago

#9035 assigned enhancement

[patch] allow removing output of other macros from included pages

Reported by: benoitg Owned by: rjollos
Priority: normal Component: IncludeMacro
Severity: normal Keywords: macro processor renderer nesting sanitizing
Cc: Trac Release: 0.11

Description

This was inspired (and works well with) OdtExportPlugin

This patch implements a named remove_macros parameter. By default the output of the macros PageOutline, TracGuideToc, !TOC, TranslatedPages is removed, just like in OdtExportPlugin.

So:

[[Include(PageName, remove_macros=)]]

produces the same behaviour as before the patch.

[[Include(PageName, remove_macros=PageOutline:TracGuideToc:TOC:TranslatedPages)]]

produces the same behaviour as not passing any remove_macros parameters.

[[Include(PageName, remove_macros=PageOutline:TOC)]]

would only remove the output of the PageOutline and TOC macros, and leave the rest alone.

Attachments (2)

includemacro_remove_macros.patch (2.2 KB) - added by benoitg 3 years ago.
Implements a remove_macros named parameter to remove the output of a colon (:) separated list of macros in the included page
includemacro_remove_macros_v2.patch (1.8 KB) - added by benoitg 3 years ago.
Re-generated patch so it applies cleanly on top of [11266] (some of the changes were similar).

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by benoitg

Implements a remove_macros named parameter to remove the output of a colon (:) separated list of macros in the included page

Changed 3 years ago by benoitg

Re-generated patch so it applies cleanly on top of [11266] (some of the changes were similar).

comment:1 Changed 21 months ago by hasienda

  • Keywords macro processor renderer nesting sanitizing added
  • Owner changed from coderanger to rjollos

#1728 is related.

comment:2 Changed 8 months ago by rjollos

  • Status changed from new to assigned

Add Comment

Modify Ticket

Action
as assigned .
Author


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

 
Note: See TracTickets for help on using tickets.