Fix fenced code block in a JS templates (#19908)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-09-07 12:17:22 +08:00
1 parent 036e72a4bb
commit fcaf991e7f
6 files changed
+92 -20

No files matched your search

@@ -10,10 +10,6 @@ const unstableTests = new Map(
],
["js/ignore/semi/head-ignored.js", (options) => options.semi === false],
"js/comments/return-statement.js",
[
"js/multiparser-markdown/codeblock.js",
(options) => options.proseWrap === "always",
],
"flow/hook/declare-hook.js",
"flow/hook/hook-type-annotation.js",
"flow/comments/type_annotations.js",
@@ -69,15 +69,35 @@ markdown\\\`
\\\`\\\`\\\`
\`;
md\`
\\\`\\\`\\\`js
markdown\\\`
\\\\\\\`\\\\\\\`\\\\\\\`\\\\\\\`js
console.log('hi');
\\\\\\\`\\\\\\\`\\\\\\\`\\\\\\\`
\\\`
\\\`\\\`\\\`
\`;
=====================================output=====================================
md\`
~~~js
~~~~js
markdown\\\`
~~~js
console.log("hi");
~~~
\\\`;
~~~
~~~~
\`;
md\`
~~~~js
markdown\\\`
~~~js
console.log("hi");
~~~
\\\`;
~~~~
\`;
================================================================================
@@ -7,3 +7,13 @@ markdown\`
\`
\`\`\`
`;
md`
\`\`\`js
markdown\`
\\\`\\\`\\\`\\\`js
console.log('hi');
\\\`\\\`\\\`\\\`
\`
\`\`\`
`;