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

<style></style> in blade #385

Closed
pkboom opened this issue Mar 21, 2022 · 3 comments · Fixed by shufo/blade-formatter#608
Closed

<style></style> in blade #385

pkboom opened this issue Mar 21, 2022 · 3 comments · Fixed by shufo/blade-formatter#608
Assignees

Comments

@pkboom
Copy link

pkboom commented Mar 21, 2022

Hi, thanks for the package. I don't know if it's just me but when I use style in blade, the closing tag always adds one blank line before it.

Template

<style>
.some-background {
  background-color: red;
}
</style>

After formatting, it looks like this:

<style>
.some-background {
  background-color: red;
}

</style>

Context (Environment)

Version: 1.65.2
Plugin: 0.13.11
Laravel: 8.x
PHP: 8.x

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale Stale label label May 21, 2022
@shufo
Copy link
Owner

shufo commented May 22, 2022

@pkboom
I think this is because js-beautify, which is used internally, inserts whitespace in the style tag as well when the end-with-newline option is enabled.
I think this is an unexpected behavior so I'll look into it. Thanks.

@shufo
Copy link
Owner

shufo commented Jun 5, 2022

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