You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
yaspeller exhibits some strange behaviour in some circumstances when checking certain words prefixed with the word "a".
It can be reproduced using the command line invocation.
Setup:
mkdir yaspeller-issue; cd yaspeller-issue
npm init -y
npm i yaspeller
echo '{"dictionary":["blockchain"]}' > .yaspellerrc.json
Test cases:
The word by itself is correctly allowed.
echo "blockchain" | ./node_modules/.bin/yaspeller --stdin -l en
Spelling check:
✓ stdin 379 ms
No errors.
Checking finished: 0.477 sec.
The word prefixed by "a " causes an error.
echo "a blockchain" | ./node_modules/.bin/yaspeller --stdin -l en
Spelling check:
✗ stdin 378 ms
-----
Typos: 1
1. a blockchain (1:1, suggest: black chain)
-----
Fix typo or add word to dictionary at .yaspellerrc.json ("dictionary" property) if you are sure about spelling. Docs: https://github.com/hcodes/yaspeller#configuration
Checking finished: 0.48 sec.
"on a blockchain" is fine.
echo "on a blockchain" | ./node_modules/.bin/yaspeller --stdin -l en
Spelling check:
✓ stdin 375 ms
No errors.
Checking finished: 0.474 sec.
But "by a blockchain" is not.
echo "by a blockchain" | ./node_modules/.bin/yaspeller --stdin -l en
Spelling check:
✗ stdin 374 ms
-----
Typos: 1
1. a blockchain (1:4, suggest: black chain)
-----
Fix typo or add word to dictionary at .yaspellerrc.json ("dictionary" property) if you are sure about spelling. Docs: https://github.com/hcodes/yaspeller#configuration
Checking finished: 0.472 sec.
Tested against version 8.0.1.
Other words that are known to trigger the error in similar circumstances are "blockchains" and "mainnet". However, "mainnets" is OK.
The text was updated successfully, but these errors were encountered:
yaspeller exhibits some strange behaviour in some circumstances when checking certain words prefixed with the word "a".
It can be reproduced using the command line invocation.
Setup:
Test cases:
The word by itself is correctly allowed.
The word prefixed by "a " causes an error.
"on a blockchain" is fine.
But "by a blockchain" is not.
Tested against version 8.0.1.
Other words that are known to trigger the error in similar circumstances are "blockchains" and "mainnet". However, "mainnets" is OK.
The text was updated successfully, but these errors were encountered: