Skip to content

GFM False positives for: Link fragments should be valid #7

@jayvdb

Description

@jayvdb

The following TOC items in my README.md are failing

- [Establishing the relationship between an openapi spec and its corresponding clients/services/adapters/models in CI](#establishing-the-relationship-between-an-openapi-spec-and-its-corresponding-clientsservicesadaptersmodels-in-ci)
- [The Earthly "build-image" commands](#the-earthly-build-image-commands)
- [Which versions get deployed?](#which-versions-get-deployed)
- [Printing help for the ./kindctl script](#printing-help-for-the-kindctl-script)

When the .md is rendered on GitHub, these links work correctly.
Also, this TOC is generated by a VSCode extension yzhang.markdown-all-in-one.

Now it is true that other renders may fail to link these correctly.

IMO there are two ways to avoid people seeing these errors unnecessarily.

  1. Have a setting for markdown flavour, so that each project can select whether they want Github Flavor Markdown, CommonMark, or other flavour
  2. Allow disabling lints, in this case https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md051.md , and ideally support inline config like https://github.com/DavidAnson/markdownlint/tree/v0.32.1?tab=readme-ov-file#configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions