stylefmt icon indicating copy to clipboard operation
stylefmt copied to clipboard

quotes handled incorrectly

Open hanakin opened this issue 8 years ago • 0 comments

Currently when formatting based on the string-quotes setting all quotes are replaced regardless of occurence in the files. This is highly problematic as it eliminates the ability to use encapsulated quoting. Consider the following

It will render the singles as doubles given the following setting "string-quotes": double but the doubles already within will remain doubles thus breaking the code

given the following css

.foo {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="32" height="24" viewBox="0 0 32 24"><polygon points="0,0 32,0 16,24" style="fill: #{$color}"></polygon></svg>');
}

if you run it on this only the singles are affected. when in fact the ideal thing to do would be to fix the outers to match the setting and reverse the inside quotes.

hanakin avatar Jan 04 '17 20:01 hanakin