dubreuia / intellij-plugin-save-actions

Supports configurable, Eclipse like, save actions, including "organize imports", "reformat code" and "rearrange code".
MIT License
531 stars 101 forks source link

Line break in the middle of a string value #369

Closed lcsqlpete closed 3 years ago

lcsqlpete commented 3 years ago

I am running into situations where a hard line break is inserted part way through a string value in an html file which results in a string of spaces being appended to the first part of the string if I get its value using javascript.

For example:

<span id="exchange-dates" data-fromdateymd="{{ExchangeFromDateYMD}}" data-todateymd="{{ExchangeToDateYMD}}">{{ExchangeFromDateMDY}}
- {{ExchangeToDateMDY}}</span>

It may not be obvious because of the github formatting but there is a line break after "{{ExchangeFromDateMDY}}"

I should have mentioned a couple of things. First, the tag above was all on one line before the file was saved and second, this does not happen if I disable the File Save plugin

ktomk commented 3 years ago

@lcsqlpete does it happen when you disable save-actions and only reformat the code?

lcsqlpete commented 3 years ago

Good point. Reformatting did produce the same problem so I guess this is a PHPStorm problem not the plugin.

ktomk commented 3 years ago

Then I'd say you can close the issue here @lcsqlpete - and for the concrete problem: you might be able to control this with line-length settings for html files in the PhpStorm editor settings.

lcsqlpete commented 3 years ago

Not a Save File plugin problem