(file, state, languageSignature)
| 1353 | } |
| 1354 | |
| 1355 | function shouldApplyLanguage(file, state, languageSignature) { |
| 1356 | const langExtFn = file?.currentLanguageExtension; |
| 1357 | if (typeof langExtFn !== "function") return false; |
| 1358 | const isPlainText = |
| 1359 | String(file?.currentMode || "").toLowerCase() === "text"; |
| 1360 | return ( |
| 1361 | file.__cmLanguageSignature !== languageSignature || |
| 1362 | !file.__cmLanguageReady || |
| 1363 | (!isPlainText && !hasLanguageSupport(state)) |
| 1364 | ); |
| 1365 | } |
| 1366 | |
| 1367 | function markLanguageReady(file, languageSignature, ready) { |
| 1368 | file.__cmLanguageSignature = languageSignature; |
no test coverage detected