pebble
pebble copied to clipboard
i18n and multiline strings
Hi, I'm enjoying so far using your lib! One thing I'm not sure about is if multiline values coming from resource bundles are supported? More specifically - will new lines be preserved? In my case this seems to fail.
When I define:
foo.bar=Hi,\
there\
\
how are\
\
you?
and evaluate the template, i get Hi,therehow areyou? evaluated.
Any hint?
Thanks
Did you try to set newLineTrimming to false ?
private val engine: PebbleEngine = PebbleEngine.Builder().newLineTrimming(false).build()
I'm using that engine.
Maybe some tests can be added to https://github.com/PebbleTemplates/pebble/blob/master/pebble/src/test/java/com/mitchellbosecke/pebble/I18nExtensionTest.java#L24