cspell icon indicating copy to clipboard operation
cspell copied to clipboard

failure to exclude urls from rst files

Open ssbarnea opened this issue 6 years ago • 2 comments

I had this sequence below which reports Fjira as an unknown word and I know no way to avoid it:

<dash-feed://https%3A%2F%2Fjira.readthedocs.io%2Fen%2Flatest%2Fjira.xml>`_ format.

I didn't check the code but I have reasons to believe that probably URL support had the protocol hardcoded and thus failing to recognise it as a URI/URL.

ssbarnea avatar Apr 29 '18 17:04 ssbarnea

It just doesn't know about percent-encoding.

It is easy enough to have it ignore those using an ignore regex:

<!-- cSpell:ignoreRegExp https%.*?> -->

or add something similar to your cspell.json

"ignoreRegExpList": [ "/https%3A%2F%2F.*?/gi" ]

Jason3S avatar Apr 30 '18 15:04 Jason3S

I think that the real uri here is dash-feed://.* because the encoded part is par of the full uri. Yep, happens to be another URI but the generic ignore rule should be to avoid looking inside URIs in general, something that [\w\-]+:(\/?\/?)[^\s]+ maybe?

Reference:

  • https://www.regextester.com/94092 - fails to match this example because is missing dash in scheme

ssbarnea avatar Apr 30 '18 19:04 ssbarnea