-
Notifications
You must be signed in to change notification settings - Fork 18
Description
When using @@IF@@ sections, newlines are added unconditionally. For example I have a template file named signature.tmplt containing:
@@IF@@ $_EXIST:Params_@
(@_Params_@);
@@ELSE@@
;
@@END_IF@@
Say I render it in a string that I want to use in another template with the tagname @_Signature_@ which is like this:
procedure Hello @_Signature_@ -- This is a comment.
This will not be possible because @_Signature_@ will contain a newline (at the beginning or at the end). The workaround I found was to use a @_REPLACE_ALL((\n)/):Signature_@ filter but that makes the template unnecessarily complex - in addition to many other filters I use.
(example line 32 of my template here: https://gitrepos.estec.esa.int/taste/aadl-parser/blob/master/templates/skeletons/ada/header.tmplt )
I would suggest to remove the newlines by default (since they are always easy to add by the user of the result of the IF section).
Thanks!