oddbird / sass-json-export

JSON exporter for Sass. Based on SassyJSON, by Kitty Giraudel.
MIT License
12 stars 4 forks source link

Doesn't escape nested double-quotes #2

Open carljm opened 8 years ago

carljm commented 8 years ago

Double-quote characters within a string value need to be backslash-escaped.

jacksleight commented 4 years ago

I've found a workaround for this issue, by overriding the _proof-quote function and using the str-replace function from https://css-tricks.com/snippets/sass/str-replace-function/:

@import 'sass-json-export.scss';
@function _proof-quote($value) {
  @return '"#{str-replace($value, '"', '\\"')}"';
}