maxbec / openHAB-Alignment-Tool

This extension adds support for formatting and indenting openHAB files. At the moment only the item-files are supported.
https://marketplace.visualstudio.com/items?itemName=max-beckenbauer.oh-alignment-tool
Eclipse Public License 2.0
21 stars 4 forks source link

Incorrect reformatting with escaped quotes in bindingconfig #32

Closed CWempe closed 4 years ago

CWempe commented 4 years ago

I just found another special case where the reformatting dod not work correctly.

Example code:

String  Awtrix01timer       "Timer"         <clock> {mqtt=">[mosquitto:awtrix/basics:command:*:{\"timer\"\\:\"${command}\",\"soundfile\"\\:1,\"count\"\\:10,\"text\"\\:\"Test123\"}]", autoupdate="false"}

Ouput when reformatting the document:

image

Expected: The mqtt-bindingconfig hould be only one line.

image

I understand this is a very special use case and I wish I dod not have to excape all those characters. 😄

So I respect if this will not get fixed.

Another workaournd could be to implement a special comment like:

// ##openHAB-Alignment-Tool_skipNextLines: 2##