Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect escaping of hunspell command #28

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

cniry
Copy link
Contributor

@cniry cniry commented Sep 23, 2020

Fix incorrect slashing of hunspell command params, which causes "Can't open affix or dictionary files for dictionary named "default"" on Alpine Docker container.

This example script

$source = new StringSource('Tiger, tigr, burning bright');
$speller = new Hunspell();
$issues = $speller->checkText($source, ['en_US']);

was calling this command:

'hunspell' '-i UTF-8' '-a' '-d en_US'

Which is not correctly parsed by hunspell on Alpine Docker container and throws error Failed to execute "'hunspell' '-i UTF-8' '-a' '-d en_US'": Can't open affix or dictionary files for dictionary named "default".

Executing this command inside docker containter results same error.

now it calls:

'hunspell' '-i' 'UTF-8' '-a' '-d' 'en_US'

which is successflully parsed by hunspel. Tested on Hunspell 1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants