diff --git a/src/Hunspell/Hunspell.php b/src/Hunspell/Hunspell.php index 04d5d8d..176a579 100644 --- a/src/Hunspell/Hunspell.php +++ b/src/Hunspell/Hunspell.php @@ -86,11 +86,12 @@ public function getSupportedLanguages(): array $languages = []; $output = explode(PHP_EOL, $process->getErrorOutput()); + $is_win = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; foreach ($output as $line) { $line = trim($line); if ('' === $line // Skip empty lines || substr($line, -1) === ':' // Skip headers - || strpos($line, ':') !== false // Skip search path + || strpos($line, $is_win ? ';' : ':') !== false // Skip search path ) { continue; }