[ 
https://issues.apache.org/jira/browse/FREEMARKER-192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17421953#comment-17421953
 ] 

Dániel Dékány edited comment on FREEMARKER-192 at 9/29/21, 6:26 AM:
--------------------------------------------------------------------

Currently we have up to 3 parameters: 1. separator, 2. empty result, 3. list 
ending. What we could do in principle is that if there are 4 parameters, then 
the meaning of the parameters changes to: 1. separator, 2. empty result, 3. 
list starting, 4. list ending. But there the meaning of the parameter 3 
changed, which is confusing. Anyway, I don't really a better way. (Would be 
much easier and readable if FTL supports named parameters for function calls, 
but since {{=}} means the same as {{==}}, we can't add them in backward 
compatible way. Unless we use {{:}} instead... Oh well, this is a different 
issue.)


was (Author: ddekany):
Currently we have up to 3 parameters: 1. separator, 2. empty result, 3. list 
ending. What we could do in principle is that if there are 4 parameters, then 
the meaning of the parameters changes to: 1. separator, 2. empty result, 3. 
list starting, 4. list ending. But there the meaning of the parameter 3 
changed, which is confusing. Anyway, I don't really see another. (Would be much 
easier and readable if FTL supports names parameters for function calls, but 
since {{=}} means the same as {{==}}, we can't add them in backward compatible 
way. Unless we use {{:}} instead... Oh well, this is a different issue.)

> Add a "list beginning" parameter to "join" for sequences
> --------------------------------------------------------
>
>                 Key: FREEMARKER-192
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-192
>             Project: Apache Freemarker
>          Issue Type: Improvement
>            Reporter: Sebastian Schuberth
>            Priority: Minor
>
> The "join" built-in on sequences already has a "list ending" optional 
> parameter. It should have a corresponding "list beginning" optional parameter 
> to conveniently print headers only for non-empty sequences.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to