You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.
Consecutive lines are joined according to the following heuristic: if the join location borders a template or HTML tag on either side, the lines are joined with no space. If the join location does not border a template or HTML tag on either side, the lines are joined with exactly one space.
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:
... some text some text
{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}
After formatting
Closure templates will render this with a missing space:
... some text sometext
{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}
Guessing the change would have to be somewhere here but I'm not sure:
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}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
bamboo-soy/src/main/java/com/google/bamboo/soy/format/SoyCodeStyleSettingsProvider.java
Lines 44 to 46 in cc62277
The text was updated successfully, but these errors were encountered: