From b44e702679cc81fec073433a69b5dc92a76fd7fb Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Thu, 21 May 2020 20:29:10 +0900 Subject: [PATCH] HTML: 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 + + +