Modify

Opened 6 years ago

Last modified 3 years ago

#9035 assigned enhancement

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

Reported by: Benoit Grégoire Owned by: Ryan J Ollos
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 Benoit Grégoire 6 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 Benoit Grégoire 5 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 6 years ago by Benoit Grégoire

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

Changed 5 years ago by Benoit Grégoire

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

comment:1 Changed 4 years ago by Steffen Hoffmann

Keywords: macro processor renderer nesting sanitizing added
Owner: changed from Noah Kantrowitz to Ryan J Ollos

#1728 is related.

comment:2 Changed 3 years ago by Ryan J Ollos

Status: newassigned

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Ryan J Ollos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.