Fix unstable comment between a tagged template's tag and quasi (#19345)

This commit is contained in:
Sarath Francis authored and GitHub committed 2026-07-19 10:18:36 +08:00
1 parent fe0acca210
commit b35943fa92
6 files changed
+75 -12

No files matched your search

@@ -10,7 +10,6 @@ const unstableTests = new Map(
],
["js/ignore/semi/head-ignored.js", (options) => options.semi === false],
"js/comments/return-statement.js",
"js/comments/tagged-template-literal.js",
[
"js/multiparser-markdown/codeblock.js",
(options) => options.proseWrap === "always",
@@ -6849,6 +6849,12 @@ foo /* comment 5 */
\`
\`;
foo /* comment 6 */
\`x\`;
foo // comment 7
\`x\`;
=====================================output=====================================
foo\`\` // comment 1
@@ -6862,8 +6868,15 @@ foo // comment 3
foo /* comment 4 */ \`
\`
foo /* comment 5 */\`
foo /* comment 5 */
\`
\`
foo /* comment 6 */
\`x\`
foo // comment 7
\`x\`
================================================================================
`;
@@ -6889,6 +6902,12 @@ foo /* comment 5 */
\`
\`;
foo /* comment 6 */
\`x\`;
foo // comment 7
\`x\`;
=====================================output=====================================
foo\`\`; // comment 1
@@ -6902,9 +6921,16 @@ foo // comment 3
foo /* comment 4 */ \`
\`;
foo /* comment 5 */\`
foo /* comment 5 */
\`
\`;
foo /* comment 6 */
\`x\`;
foo // comment 7
\`x\`;
================================================================================
`;
@@ -13,3 +13,9 @@ foo /* comment 4 */`
foo /* comment 5 */
`
`;
foo /* comment 6 */
`x`;
foo // comment 7
`x`;
@@ -173,15 +173,13 @@ foo(html // oops
\` <div><p>bar</p>foo</div> \`);
=====================================output=====================================
foo(
html // oops
\`
<div>
<p>bar</p>
foo
</div>
\`,
);
foo(html // oops
\`
<div>
<p>bar</p>
foo
</div>
\`);
================================================================================
`;