microsoft / microsoft/vscode-markdown-languageservice

Support comment-based skipping of specific link validation (similar to `<!-- markdownlint-disable -->`)

Open
#219 0 comments 0 reactions 1 assignee View on GitHub

@mjbvz is already working on this.

Since Sep 30, 2025.

feature-request
Dominant language
TypeScript
Stars
438
Forks
25
Avg merge
3d 21h
Merged PRs (30d)
1

Description

Description

When writing documentation, it is sometimes necessary to use anchors or special links that automated link validation incorrectly flags as broken.
Currently, there is no way to skip validation for a single link or a small section of content.

It would be helpful to support a comment-based mechanism, similar to markdownlint, that allows temporarily disabling link validation.


Proposed Solution

Introduce the following comment directives:

<!-- link-validate-disable -->
[A](#A)  <!-- link-validate-disable-line -->
<!-- link-validate-enable-->

<a id='A'></a>
A
  • <!-- link-validate-disable -->: disable link validation starting from this point
  • <!-- link-validate-disable-line -->: disable link validation only for the current line
  • <!-- link-validate-enable -->: re-enable link validation

Benefits
  • Prevents false positives and improves the documentation authoring experience
  • Consistent with markdownlint usage, reducing the learning curve
  • Provides fine-grained control, useful in collaborative documentation workflows

Additional Context

markdownlint already supports a similar mechanism:

<!-- markdownlint-disable -->
<!-- markdownlint-enable -->

Bringing this capability to VSCode would make link validation more flexible and practical, especially in CI/CD pipelines where false positives can block builds.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.