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

Empty style and script tags are expanded into three lines #87

Closed
clitetailor opened this issue Apr 12, 2020 · 1 comment · Fixed by #176
Closed

Empty style and script tags are expanded into three lines #87

clitetailor opened this issue Apr 12, 2020 · 1 comment · Fixed by #176
Labels
enhancement New feature or request

Comments

@clitetailor
Copy link
Contributor

I'm using Svelte with svelte-preprocessor. The following lines:

<script src="./index.ts"></script>

<style src="./index.css"></style>

is formatted as:

<script src="./index.ts">

</script>

<style src="./index.css">

</style>

My expected output should be the same as first one. Is this some kind of bug?

Thanks!

@Conduitry Conduitry added the enhancement New feature or request label May 8, 2020
@ehrencrona
Copy link
Contributor

With the current code the empty line will be gone and it turns it into:

<script src="./index.ts">
</script>

dummdidumm pushed a commit to dummdidumm/prettier-plugin-svelte that referenced this issue Jan 4, 2021
If the content of a script/style tag is completely empty (no whitespace), don't add a hardline anymore.
Fixes sveltejs#87
dummdidumm added a commit that referenced this issue Jan 4, 2021
If the content of a script/style tag is completely empty (no whitespace), don't add a hardline anymore.
Fixes #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants