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

vue-prettier removes completely valid backslash escaping character if it is occuring in text node after some text #59

Closed
seletskiy opened this issue Jan 9, 2020 · 5 comments · Fixed by #60
Assignees
Labels
type: bug Functionality that does not work as intended/expected

Comments

@seletskiy
Copy link
Contributor

@prettier/plugin-pug version: 1.1.2

This is live recording of an editor which triggers prettier on each save.
As you can see there, every time I save a file one backslash is disappearing after another.

vue-prettier bug

I also want to mention, that:

  • will cause to \ to disappear on formatting:

    h2 ID \#{{ id }}
    
  • will not cause \ to disappear:

    h2 \#{{ id }}
    

So, the problem is somehow linked to the text which precedes \.

Escaping is described here: https://pugjs.org/language/interpolation.html#string-interpolation-escaped

@Shinigami92 Shinigami92 self-assigned this Jan 9, 2020
@Shinigami92 Shinigami92 added the type: bug Functionality that does not work as intended/expected label Jan 9, 2020
@Shinigami92
Copy link
Member

I think I will fix this bug within the next 2 days

@seletskiy
Copy link
Contributor Author

@Shinigami92: thanks!

@seletskiy
Copy link
Contributor Author

As a workaround I use #{'#{{ id }}'} for now. Ugly, but works.

@Shinigami92
Copy link
Member

Released as v1.1.3
Hopefully I didn't break pipeless text interpolation 🙏

Thanks for using my plugin 🙂

@seletskiy
Copy link
Contributor Author

@Shinigami92: nice one, thanks! I can confirm that it works.

Here is 🍰 for doing it TDD style 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants