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

remove the white space after the doctype according to the property co… #7242

Merged
merged 7 commits into from
Jun 5, 2023

Conversation

JerryWu1234
Copy link
Contributor

…mpressHTML

fix #7162

Changes

remove the white space after the doctype according to the property compressHTML

Testing

Docs

@changeset-bot
Copy link

changeset-bot bot commented May 30, 2023

🦋 Changeset detected

Latest commit: 1512f4a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label May 30, 2023
@Princesseuh
Copy link
Member

@matthewp Are there any streaming concerns with this? I feel like surely we made it so there's a newline after the doctype for a reason.

@JerryWu1234
Copy link
Contributor Author

@matthewp Are there any streaming concerns with this? I feel like surely we made it so there's a newline after the doctype for a reason.

will it break something ?

@natemoo-re
Copy link
Member

will it break something ?

I don't think so. Newlines typically mean the browser will flush the buffer and attempt to parse the latest chunk as HTML, so in this case it will process the doctype when the first chunk is flushed. Seems like fine behavior to me.

@Princesseuh
Copy link
Member

@matthewp The rest of the function is still faulty, the suggestion only correct one instance

@JerryWu1234
Copy link
Contributor Author

@matthewp The rest of the function is still faulty, the suggestion only correct one instance

I noticed that and i fixed it

@bluwy bluwy merged commit 890a2bc into withastro:main Jun 5, 2023
@bluwy
Copy link
Member

bluwy commented Jun 5, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTML minification with Doctype tag
6 participants