mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
21 lines
No EOL
835 B
Text
21 lines
No EOL
835 B
Text
// Author: DosX
|
||
// E-Mail: collab@kay-software.ru
|
||
// GitHub: https://github.com/DosX-dev
|
||
// Telegram: @DosX_dev
|
||
|
||
function _isLangDetected() {
|
||
return _getNumberOfResults("language") > 0;
|
||
}
|
||
|
||
function _setLang(languageName, isPositive, version) {
|
||
|
||
// If one programming language has already been detected, then we ignore the
|
||
// following results containing several variants of languages written with a
|
||
// slash. (For example, "C/C++" will not be added to the list of languages
|
||
// if there is already a detection of "C" or "C++")
|
||
if (_isLangDetected() && languageName.indexOf("/") !== -1)
|
||
return;
|
||
|
||
if ((isPositive == true || isPositive == undefined) && File.isVerbose() && !_isResultPresent("language", languageName))
|
||
_setResult("language", languageName, version ? version : "", "");
|
||
} |