streetsidesoftware / vscode-spell-checker

A simple source code spell checker for code
https://streetsidesoftware.github.io/vscode-spell-checker/
Other
1.39k stars 124 forks source link

Words containing the escape character "\" are ignored #210

Open lilgallon opened 6 years ago

lilgallon commented 6 years ago

I'm working with french words, so I need to write some sentences like "La porte d'une maison est ouverte". The convention in my code says that I need to put ' as string separator instead of " (I'm using python).

In my code, the sentence becomes 'La porte d\'une maison'. The french dictionnary does not recognize "d\'une", which is legitimate, but when I add "d\\'une" in the dictionnary, the spell checker keep saying me that the word is unknown.

Here are my cSpell settings :

"cSpell.language": "en,fr",
"cSpell.userWords": [
    "d\\'une"
]

Thanks for your work, awesome plugin ;)

Jason3S commented 6 years ago

Escape characters are an issue. I still haven't figured out a clean way to do this.

Jason3S commented 6 years ago

The enhancement is to increase support for escape sequences. Even things like: d'une should work in html sequences.

OmgImAlexis commented 3 years ago

I'm hitting this issue with 'API key has\'t changed'.

Couldn't it take the surrounding quotes into account when suggesting the change?

Jason3S commented 3 years ago

@OmgImAlexis,

Let me see if I understand you.

'API key has\'t changed' currently gets corrected to 'API key hasn't changed' when it should be 'API key hasn\'t changed'.

Is this what you mean?

OmgImAlexis commented 3 years ago

@Jason3S yes either that or it should suggest using backticks and keeping the apostrophe.