Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slashes incorrectly escaped in output? #51

Closed
adrianbruntonsagecom opened this issue Dec 8, 2023 · 2 comments · Fixed by #52
Closed

Slashes incorrectly escaped in output? #51

adrianbruntonsagecom opened this issue Dec 8, 2023 · 2 comments · Fixed by #52

Comments

@adrianbruntonsagecom
Copy link
Contributor

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
Copy link
Owner

43081j commented Dec 10, 2023

i suspect i've fixed this in #52 FYI

@adrianbruntonsagecom
Copy link
Contributor Author

i suspect i've fixed this in #52 FYI

Looks like it does the job thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants