chore: format

This commit is contained in:
Timothy Jaeryang Baek
2026-05-11 02:29:13 +09:00
parent 39777e35d8
commit c951b4f262
69 changed files with 143 additions and 29 deletions
+1 -3
View File
@@ -8,7 +8,5 @@ export function injectCsp(html: string, csp: string): string {
const escaped = csp.replace(/"/g, '"');
const tag = `<meta http-equiv="Content-Security-Policy" content="${escaped}">`;
const idx = html.indexOf('<head>');
return idx !== -1
? html.slice(0, idx + 6) + tag + html.slice(idx + 6)
: tag + html;
return idx !== -1 ? html.slice(0, idx + 6) + tag + html.slice(idx + 6) : tag + html;
}