Detect-It-Easy/db/Binary/source_text.HTML.1.sg
2026-05-25 21:03:46 +03:00

15 lines
No EOL
314 B
JavaScript
Executable file

// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>
meta("source", "HTML");
function detect() {
var sText = Binary.getHeaderString();
if (/^<\s*(!DOCTYPE\s+)?html\b[^>]*>/im.test(sText)) {
bDetected = true;
}
sLang = "HTM";
return result();
}