Skip to content

support text fragments links (do not report them as invalid) #3952

Open

Description

@setop

It could be convenient to add Text fragment links : a link inside a page including the free text portion to focus on.

The syntax leverage on anchor syntax, using the fragment of the URL.

As it looks like anchor link, Mkdocs is tricked into trying to validate them as a proper anchor link and since the text is not an actual anchor. It reports an issue.

INFO    -  Doc file 'foo.md' contains a link 'bar.md#:~:text=focus_on_text, but the doc 'bar.md' does not contain an anchor
           '#:~:text=focus_on_text'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions