abricotine icon indicating copy to clipboard operation
abricotine copied to clipboard

Markdown linter

Open brrd opened this issue 8 years ago • 3 comments

From #200 @agirorn.

It would be nice if Abricotine could verify links and show a red underline for links have not been defined and are invalid. Also, every link could be checked if it actually exists.

[NotDefinedLink] The link is referring to reference that is not defined. 
[some website][NotDefinedLink] The link is referring to reference that is not defined. 

[BrokenLink] The link is referring to a broken link. 
[some website][BrokenLink] The link is referring to a broken link. 

[ValidLink] This should be ok.
[GitHub website][ValidLink] This should be ok.
[GitHub website](https://github.com/) This should be ok.

[BrokenLink]: https://some-broken-link.com/
[ValidLink]: https://github.com/

brrd avatar Sep 04 '17 08:09 brrd

@agirorn I don't think sending a web request each time a link is typed would be a good idea in term of performance. And I don't think it is really reliable.

I think it is not the purpose of Abricotine to check this. One should use a real link checker to perform this in a reliable way.

brrd avatar Sep 04 '17 08:09 brrd

@brrd I see your point.

What about validating if a link is properly defined?

Like when you for get to define the link and only have [link] or [link text][link] and no [link] http://domain.com/

agirorn avatar Sep 08 '17 14:09 agirorn

Hmm... If we go this way, then I think links validation is a small part of a bigger thing. Instead of checking links only, it would be more efficient and useful to provide a way to execute a markdown linter in Abricotine such as https://github.com/wooorm/remark-lint or https://github.com/DavidAnson/markdownlint Don't you think so?

brrd avatar Sep 08 '17 16:09 brrd