streetsidesoftware / vscode-spell-checker

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

markdown: ignore link identifier (option) #296

Open noraj opened 5 years ago

noraj commented 5 years ago

For markdown files, there should be an option to ignore link identifier. They are meant to be identifier not true words.

image

johnddx commented 5 years ago

I tried to add a regular expression to ignore link paths using the text notation, but it doesn't work:

(?<=\\[[^\\]]+\\])\\([^\\)]+\\)

This same expression does match links in powershell (after unescaping all the \ chars), so either the grammar is different or there is some limitation in the spell-checker.

Maybe an expression ignoring just the identifiers would work better.

Jason3S commented 5 years ago

@johnddx Your regex will match [this is a link](https://example.org), but not [this is a link][link].

Try the following:

"ignoreRegExpList": [
    "/(?<=\\])\\[[^\\]]+\\]/",
    "/\\[[^\\]]+\\]:/"
]
Jason3S commented 5 years ago

I will add this to the default behavior of the spell checker.

PabloLION commented 3 years ago

I will add this to the default behavior of the spell checker.

maybe add it as an optional behavior