Skip to content

Commit 708aec5

Browse files
committed
clean
1 parent 7f9a388 commit 708aec5

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

demo-script-tag-escape/test.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const checkEscaping = (code, isLiteral) => {
6363
}
6464
};
6565

66-
console.log(' │ Literal (dedent`...`) │ Function (dedent(...))');
67-
console.log('───────────────────────────────────┼────────────────────────');
66+
console.log(' │ Literal (dedent`...`) │ Function (dedent(`...`))');
67+
console.log('─────────────┼─────────────────────────┼────────────────────────');
6868
const rolldownLiteral = checkEscaping(rolldownCode, true);
6969
const rolldownFunction = checkEscaping(rolldownCode, false);
7070
const tsdownLiteral = checkEscaping(tsdownCode, true);
@@ -73,10 +73,3 @@ const tsdownFunction = checkEscaping(tsdownCode, false);
7373
console.log(`Rolldown │ ${rolldownLiteral.padEnd(23)}${rolldownFunction}`);
7474
console.log(`Tsdown │ ${tsdownLiteral.padEnd(23)}${tsdownFunction}`);
7575
console.log('');
76-
77-
console.log('💡 CONCLUSION:');
78-
console.log('─'.repeat(80));
79-
console.log(
80-
'When bundlers process tagged template literals (dedent`...`), they may escape </script>'
81-
);
82-
console.log('Using function call syntax (dedent(...)) avoids this escaping behavior.');

0 commit comments

Comments
 (0)