mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 09:24:29 +02:00
Fix content type detection
This commit is contained in:
@@ -26,7 +26,10 @@ function detectFromContent(
|
|||||||
|
|
||||||
if (content.startsWith('{') || content.startsWith('[')) {
|
if (content.startsWith('{') || content.startsWith('[')) {
|
||||||
return 'json';
|
return 'json';
|
||||||
} else if (content.startsWith('<!DOCTYPE') || content.startsWith('<html')) {
|
} else if (
|
||||||
|
content.toLowerCase().startsWith('<!doctype') ||
|
||||||
|
content.toLowerCase().startsWith('<html')
|
||||||
|
) {
|
||||||
return 'html';
|
return 'html';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user