43081j/postcss-lit

Slashes incorrectly escaped in output?

adrianbruntonsagecom opened this issue · 2 comments

We've noticed that slashes in the CSS output are doubling in quantity. Therefore, this:

  static override styles = css`
  .block {
    content: "\\e90e";
  }
  `;

Is becoming this:

  static override styles = css`
.block {
    content: "\\\\e90e";
  }
  `;

I've made a reproduction of the problem here:
https://github.com/adrianbruntonsagecom/postcss-lit-escaping-issue

To see it:
Clone repo:
git clone https://github.com/adrianbruntonsagecom/postcss-lit-escaping-issue.git

Install dependencies:
npm i

Run postcss:
npm start

You'll see output.ts is generated with twice the number of slashes in the content property than expected.

43081j commented

i suspect i've fixed this in #52 FYI

i suspect i've fixed this in #52 FYI

Looks like it does the job thanks :)