cspell icon indicating copy to clipboard operation
cspell copied to clipboard

Words containing HTML Symbol Entities should not be marked as an error

Open LucasOe opened this issue 2 years ago • 2 comments

When writing text in HTML it is common for apostrophes and other words to be replaced by escape codes. Currently, words like "doesn't" get marked as an error. In my opinion it would be best if the word got treated the same as "doesn't" in this example.

LucasOe avatar Feb 05 '23 07:02 LucasOe

I second this, and also it might be good to add a config parameter for "ignoredCharacters" for people to work around this. You say in the docs on "How it works" that All symbols and punctuation are ignored. so I assume this means there's some kind of list of removed characters, so hopefully it's possible to extend that list.

mikeybinns avatar Jul 28 '23 15:07 mikeybinns

Same here @Jason3S, I had to add doesn in my configuration to overcome this. I shouldn't have to. If I use a regular quote ' it passes spell check but ES Lint shows error:

image

(Link for react/no-unescaped-entities)

  • Using a subexpression doesn{`'`}t doesn't help. (Pun unintended 😆)
  • Using doesn’t doesn't help either.
  • Using doesn’t (literal right-tilted quote char) helps, but this is a Unicode character. We lose the benefit of using an HTML entity.
  • One workaround is to use {"doesn't"} which works, since ES Lint has no complaints about the subexpression, and cSpell passes on the whole subexpression. This is a language-specific thing though.

ADTC avatar Mar 31 '24 19:03 ADTC