Skip to content

Commit 7cc00ca

Browse files
authored
Merge pull request #344 from htmlhint/dev/coliff/lowercase-doctype-autofix
Autofix `doctype-first` is now lowercase
2 parents 8a180f1 + b3c97f9 commit 7cc00ca

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.cspell.json
12
.vscode-test/
23
htmlhint/out/
34
htmlhint/server/

htmlhint-server/src/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ function createDoctypeFirstFix(
752752

753753
// Insert DOCTYPE at the beginning of the document
754754
const insertPosition = document.positionAt(0);
755-
const newText = "<!DOCTYPE html>\n";
755+
const newText = "<!doctype html>\n";
756756

757757
const edit: TextEdit = {
758758
range: {
@@ -803,7 +803,7 @@ function createDoctypeHtml5Fix(
803803
start: document.positionAt(doctypeStart),
804804
end: document.positionAt(doctypeEnd),
805805
},
806-
newText: "<!DOCTYPE html>",
806+
newText: "<!doctype html>",
807807
};
808808

809809
const workspaceEdit: WorkspaceEdit = {

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"build": "npm run compile",
1919
"lint": "eslint .",
2020
"lint:fix": "eslint . --fix",
21-
"prettier": "prettier --write \"**/*.{js,md,ts,yml}\"",
21+
"prettier": "prettier --write \"**/*.{js,json,md,ts,yml}\"",
2222
"spellcheck": "npx cspell \"**/*.{html,js,json,md,ts,yml}\"",
2323
"postinstall": "cd htmlhint && npm i && cd ../htmlhint-server && npm i",
2424
"compile": "cd htmlhint-server && npm run compile && cd ../htmlhint && npm run compile",
@@ -43,7 +43,7 @@
4343
"glob": "^13.0.0",
4444
"globals": "^16.5.0",
4545
"mocha": "^11.7.5",
46-
"prettier": "3.7.1",
46+
"prettier": "3.7.3",
4747
"ts-node": "^10.9.2",
4848
"typescript": "5.6.3"
4949
},

0 commit comments

Comments
 (0)