pystache icon indicating copy to clipboard operation
pystache copied to clipboard

pystache.render should take an optional delimiters parameter

Open georgevreilly opened this issue 12 years ago • 4 comments
trafficstars

The public pystache.render function should take an optional delimiters parameter. Lower-level functions take delimiters as an optional parameter, but there's no easy way to pass custom delimiters down into them.

I know that, as a workaround, the template can be prefixed with Set Delimiter tags, such as {{=<% %>=}}, but this is tedious.

georgevreilly avatar Jun 04 '13 22:06 georgevreilly

Another work-around is to set the DELIMITERS global. Does that work for your use case? But I agree it should be exposed.

cjerdonek avatar Jun 04 '13 23:06 cjerdonek

I suppose that would work, but it's ugly. My use case is two-phase template evaluation, build-time and run-time.

georgevreilly avatar Jun 04 '13 23:06 georgevreilly

I suppose that would work, but it's ugly.

Agreed. That's why I called it another work-around. :grinning:

cjerdonek avatar Jun 04 '13 23:06 cjerdonek

How amazing is that. I've the same requirement @georgevreilly and that too after 7 years. I suppose this one is not solved then.

pavanmehta91 avatar Mar 06 '20 11:03 pavanmehta91