mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:13:51 +01:00
Fix content type detection
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user