Fix content type detection

This commit is contained in:
Gregory Schier
2024-10-09 17:20:09 -07:00
parent be9fbbcb6e
commit 16e090b520

View File

@@ -26,7 +26,10 @@ function detectFromContent(
if (content.startsWith('{') || content.startsWith('[')) {
return 'json';
} else if (content.startsWith('<!DOCTYPE') || content.startsWith('<html')) {
} else if (
content.toLowerCase().startsWith('<!doctype') ||
content.toLowerCase().startsWith('<html')
) {
return 'html';
}