-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accept arbitrary urls #110
Comments
it makes sense, thanks! So do you mean that the altext should not be corrected in case is followed by a link? or that the link should not be corrected? This is what it looks in this branch:
|
I think the alt text should be checked if it is an url, if so, just accept it. If not, check the text like any other. I think that makes most sense. Usually alt text contains only a few key words or an url. |
For the example,
Ignore that I added some spaces just to avoid showing images or make links. |
I would expect that Additionally, if requested by the user, both urls should be checked for existence https://img.shields.io/crates/v/cargo_spellcheck.svg https://crates.io/crates/cargo-spellcheck ). Does that make sense? |
To speed this up, we could borrow some code from https://github.com/deadlinks/cargo-deadlinks , which works ontop of html files. We could re-use the link check code, and apply it directly on the source, without having to deal with the html parsing. Just an idea though. |
Describe the bug
Alt image text is checked, but there we should be a bit more lax and allow arbitrary urls or until #44 the alt image text should be ignored. Normally this is never shown anyways.
To Reproduce
Steps to reproduce the behaviour:
[](https://crates.io/crates/cargo-spellcheck)
cargo spellcheck README.md
Expected behavior
Please complete the following information:
Additional context
This is an issue with the tokenizer too, it splits on
.
tokens. But we could whitelist valid urls in alt image names.Note that this can most likely not be solved by a user dictionary, since it will never see the full url, but only subtokens.
The text was updated successfully, but these errors were encountered: