Closed notoriousb1t closed 7 years ago
I'm trying to figure out why we need to double escape the ' in the string.
There is no double escaping, only single escaping.
The JS strings are equivalent : "ta ' da" == 'ta \' da'
, i.e there is just a quote, no \'
(slash + quote) in that string.
The string we want to output is 'ta \' da'
. In js that can be written as "'ta \\' da'"
.
If someone gives us the string 'hello'
e.g. "'hello'"
in js
We want to write '\'hello\''
in CSS. Hence that transform. Hope that helps :rose:
The 'ta \' da' example helped me understand what you were talking about. You are talking about quotes inside the quoted string. 👍
Fixed in ef8b46d3220bd0d0d4794c22797ea93f5008b4c3
Notes from @basarat in https://github.com/typestyle/csx/commit/cfd1fc39db457547e01282d21f1462e5c66b2481