Skip to content
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

Have an issue with URLs? Read this first. #320

Open
jdkato opened this issue Jan 22, 2021 · 0 comments
Open

Have an issue with URLs? Read this first. #320

jdkato opened this issue Jan 22, 2021 · 0 comments

Comments

@jdkato
Copy link
Member

jdkato commented Jan 22, 2021

About

Since URL handling is one of the most discussed topics on this issue tracker, I've made a guide to explain some of the most common problems.

URLs in markup (HTML, Markdown, AsciiDoc, reStructuredText, ...)

In all supported markup formats, Vale lints URLs according to the following structure:

<a href="url">text</a>

where url is ignored and text is linted. This behavior is consistent with Vale's practice of linting all user-facing text.

Markdown

[this is a link](https://example.com)

this is a link is linted; https://example.com is not.

[example.com](https://example.com)

example.com is linted; https://example.com is not.

<!-- These links are syntactically equivalent -->

<https://example.com>

[https://example.com](https://example.com)

https://example.com (the text) is linted; https://example.com (the URL) is not.

[`https://example.com`](https://example.com)

Neither https://example.com (the code span) nor https://example.com (the URL) are linted.

AsciiDoc

Head over to xref:ruby.adoc[our page on Ruby].

our page on Ruby is linted; xref:ruby.adoc is not.

https://example.com[Click here]

Click here is linted; https://example.com is not.

// These links are syntactically equivalent 

https://github.com/asciidoctor/asciidoctor

<a href="https://github.com/asciidoctor/asciidoctor" class="bare">https://github.com/asciidoctor/asciidoctor</a>

https://github.com/asciidoctor/asciidoctor (the text) is linted; https://github.com/asciidoctor/asciidoctor (the URL) is not. In this case, you choose to ignore the class bare.

https://example.com[`https://example.com`]

Neither https://example.com (the code span) nor https://example.com (the URL) are linted.

URLs in source code

There is currently no support for ignoring URLs in source code. #249 tracks adding this feature.

Still having issues?

If you still believe Vale is mishandling a URL, please open an issue with your .vale.ini and the file in question (the entire file, if possible).

@errata-ai errata-ai locked as resolved and limited conversation to collaborators Jan 22, 2021
@jdkato jdkato pinned this issue Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant