Comments (8)
Well we could change docs of course. Or we can add support for the new, simpler, API? I think Iād prefer that: to support the old and the new interface?
Indeed, want to work on a PR?
from retext-spell.
Thanks @ChristianMurphy. I've had a go at implementing this in #27. Let me know if you've got any feedback, or if there are any changes you'd like to see to how I've done this.
from retext-spell.
Welcome @cgwrench! š
Sorry you ran into a spot of trouble.
Have you read https://github.com/orgs/retextjs/discussions/96#discussioncomment-7995777 ?
I think it is related to what you are seeing.
from retext-spell.
Thanks @ChristianMurphy for such a quick response. That's exactly the same issue I'm seeing, and changing the loading of the dictionary to follow what's suggested in that discussion has fixed my issue.
Does the README in this repro need to be updated?
from retext-spell.
I'd lean yes, the documentation should be updated.
PRs are welcome!
@wooorm feel free to chime in if you feel otherwise.
from retext-spell.
Thanks @ChristianMurphy and @wooorm.
I'd love to try and contribute a fix. However, when looking into what might need to change, I found that there are tests that cover the various ways you can register a dictionary1. So I was at a bit of a loss trying to explain why I was seeing the issue I first reported in this issue. I've tracked in down to the version of dictionary-en
. With the repro steps I outlined, I ended up with version 4.0.0 of dictionary-en
, downgrading to version 3.0.0 meant that everything worked as expected.
I'm not sure what the correct change to make is so that retext-spell can handle both versions. Do either of you have an insights you cna share on what the best approach might be?
Footnotes
from retext-spell.
@cgwrench one approach would be to check the typeof
what is passed in.
If it is a fuction
use the existing/old logic, if it is object
use the new logic.
from retext-spell.
nice, thanks!
from retext-spell.
Related Issues (14)
- Ignore URLs? HOT 4
- Integrate with CLI or Atom HOT 5
- Too many false positives HOT 6
- Multiple dictionaries HOT 1
- Is it possible to use it on the client-side ? HOT 4
- Ignore RegExp HOT 3
- Possible security issue with lodash.includes HOT 2
- Not available via NPM :O( HOT 7
- Unexpected capital letters returned for certain capitalized misspellings HOT 4
- Cache suggestions array HOT 5
- Ignore times in common formats (e.g. 2:41PM) HOT 5
- Numbers and words with punctuation should be excluded HOT 3
- v1.0.0 not flagging spelling errors HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retext-spell.