Feature Proposal: Allow passing MAKETEXT's placeholder arguments separately

Motivation

The current MAKETEXT macro accepts substitutions for the [_1], ... placeholders as a comma-separated string in a single parameter called "args". This obviously breaks down if any of the substitutions contain comma characters.

Description and Documentation

I'm proposing an additional way to pass substitutions: parameters called arg1, arg2, .... So, this:

%MAKETEXT{"Testing [_1] and failing because of [_2]" args="MAKETEXT, placeholders and separators,the interface in MAKETEXT"}%

can be done this way:

%MAKETEXT{"Testing [_1] and failing because of [_2]" arg1="MAKETEXT, placeholders and separators" arg2="the interface in MAKETEXT"}%

The traditional syntax can still be used, there's just an extra new way to use the macro.

An alternative (or optional additional) approach would be adding a separator parameter to customize how the args parameter is split, but that is really more suitable for more dynamic macros in which the number of fields isn't known in advance IMO.

Examples

Impact

%WHATDOESITAFFECT%
edit

Implementation

-- Contributors: JanKrueger - 21 Mar 2016

Discussion

 
Topic revision: r3 - 31 May 2016, JanKrueger
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy