wbond / pybars3

Handlebars.js template support for Python 3 and 2
GNU Lesser General Public License v3.0
179 stars 46 forks source link

Whitespace control #63

Closed JGoutin closed 5 years ago

JGoutin commented 5 years ago

I have to render some templates that use whitespace control. I see that this is a known missing feature in the readme. Is there plan to support it ?

I fixed the template before it them using regex like:

re.sub(r'\s*{{~', '{{', template)

This solution may eventually also be used in pybars3.

wbond commented 5 years ago

If someone writes up an implementation with tests, myself or another contributor will look it over.

That said, this project is mostly a "scratch your own itch and add a feature you need" kind of project. I rarely use the library, and don't have a need for this feature, and don't have much time for open source, so I know I won't be implementing it.

JGoutin commented 5 years ago

OK, I pushed a #64 with a basic support.