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

Prettier + Vue + Pug, not working #1440

Closed
quangv opened this issue Jan 8, 2019 · 2 comments
Closed

Prettier + Vue + Pug, not working #1440

quangv opened this issue Jan 8, 2019 · 2 comments

Comments

@quangv
Copy link

quangv commented Jan 8, 2019

🐛 bug report

Description of the problem

Prettier seems to mess up Vue's Pug syntax.

This valid pug:

<template lang="pug">
  #app
    img(width="25%" src="./assets/logo.png")
    HelloWorld/
</template>

Prettier turned into this: (not really what we want)

<template lang="pug">
  #app img(width="25%" src="./assets/logo.png") HelloWorld/
</template>

Is there any Prettier option to prevent this from happening? Thanks!

Also could be related to this: prettier/prettier#5371

How has this issue affected you? What are you trying to accomplish?

Trying to use Pug with Vue in codesandbox, with Prettier, but Prettier seems to not like it.

Link to sandbox: link (optional)

https://codesandbox.io/s/l75l39o97l

Your Environment

Software Name/Version
Сodesandbox https://codesandbox.io/s/l75l39o97l
Browser chrome
Operating System windows 10
@lbogdan
Copy link
Contributor

lbogdan commented Mar 26, 2019

Hey @quangv ,

With the recent switch to VSCode as the default editor, this should be fixed. I just tested on your sandbox, and it looks like prettier is not messing with Pug code anymore. Please test and close this if everything's behaving as expected.

@SaraVieira
Copy link
Contributor

Closed on lack of reply, please re open if the issue persist :)

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

No branches or pull requests

3 participants