fix: standardize doctype declaration to uppercase in default template#6853
Merged
chenjiahan merged 1 commit intomainfrom Dec 28, 2025
Merged
fix: standardize doctype declaration to uppercase in default template#6853chenjiahan merged 1 commit intomainfrom
chenjiahan merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes the HTML DOCTYPE declaration from lowercase <!doctype html> to uppercase <!DOCTYPE html> across the default template, documentation, and tests. The change aligns with Prettier's formatting conventions and improves consistency across the codebase.
Key changes:
- Updated the default template generator to use uppercase DOCTYPE
- Synchronized all documentation examples with the new format
- Updated test snapshots and expectations to reflect the change
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/core/src/plugins/html.ts |
Updated the default template generator to use uppercase <!DOCTYPE html> |
packages/core/tests/__snapshots__/html.test.ts.snap |
Updated test snapshots to reflect the new DOCTYPE format |
packages/core/tests/__snapshots__/default.test.ts.snap |
Updated test snapshots to reflect the new DOCTYPE format |
packages/core/tests/__snapshots__/builder.test.ts.snap |
Updated test snapshots to reflect the new DOCTYPE format |
e2e/cases/html/inject/index.test.ts |
Updated test expectations to match the new DOCTYPE format |
e2e/cases/html/html-tags/function-usage/index.test.ts |
Updated test expectations to match the new DOCTYPE format |
e2e/cases/assets/asset-prefix/src/template.html |
Updated template file to use uppercase DOCTYPE |
website/docs/zh/guide/basic/html-template.mdx |
Updated Chinese documentation example to show uppercase DOCTYPE |
website/docs/zh/config/output/filename.mdx |
Updated Chinese documentation example to show uppercase DOCTYPE |
website/docs/zh/config/html/template.mdx |
Updated Chinese documentation example to show uppercase DOCTYPE |
website/docs/en/guide/basic/html-template.mdx |
Updated English documentation example to show uppercase DOCTYPE |
website/docs/en/config/output/filename.mdx |
Updated English documentation example to show uppercase DOCTYPE |
website/docs/en/config/html/template.mdx |
Updated English documentation example to show uppercase DOCTYPE |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks, same as |
2 tasks
Member
Author
|
Thanks for the suggestion! The default charset has been updated in #6856 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Updated the default HTML template to use
<!DOCTYPE html>instead of<!doctype html>.Related Links
doctypein lowercase prettier/prettier#7391Checklist