diff --git a/changelog_unreleased/html/pr-8371.md b/changelog_unreleased/html/pr-8371.md new file mode 100644 index 000000000..2d5fd8114 --- /dev/null +++ b/changelog_unreleased/html/pr-8371.md @@ -0,0 +1,26 @@ +#### Support ` + + + + + + + +``` diff --git a/src/language-html/utils.js b/src/language-html/utils.js index a3444a097..8397bb7b8 100644 --- a/src/language-html/utils.js +++ b/src/language-html/utils.js @@ -398,6 +398,10 @@ function _inferScriptParser(node) { return "markdown"; } + if (type === "text/html") { + return "html"; + } + if (type && (type.endsWith("json") || type.endsWith("importmap"))) { return "json"; } diff --git a/tests/html/script/__snapshots__/jsfmt.spec.js.snap b/tests/html/script/__snapshots__/jsfmt.spec.js.snap index 43cb59216..fcbce05c3 100644 --- a/tests/html/script/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html/script/__snapshots__/jsfmt.spec.js.snap @@ -101,6 +101,11 @@ printWidth: 80 + + +