Open orischwartz opened 5 years ago
+1 here.
IntelliJ IDEA has a Wrap text
option for XML files:
If you turn it off, the formatter won't break long texts in XML files. I was expecting Bamboo Soy to have something like this. In the OP's example, I wish the formatter just give it an indent and don't wrap the long line:
{template .hardWrap}
<div>Welcome to Bamboo Soy page. Long text that will break at 120 columns by default some text some text some <strong>text</strong></div>
{/template}
Closure templates has a potentially dangerous white space collapsing policy:
Right now there's no way to disable hard-wrapping without changing the default IntelliJ setting in
Editor >> Code Style >> Hard wrap at
.Example:
Before
Closure templates will render the end of this as:
After formatting
Closure templates will render this with a missing space:
Guessing the change would have to be somewhere here but I'm not sure:
https://github.com/google/bamboo-soy/blob/cc6227768fda0789a22a9d096fecdf5f898d5731/src/main/java/com/google/bamboo/soy/format/SoyCodeStyleSettingsProvider.java#L44-L46