Skip to content

Support markdownlint escape comments #522

@hguturu

Description

@hguturu

Context

I am trying to use markdown lint and mdformat together. I was wondering if there was generally a way to make these two tools play better (e.g. share configurations).

Specifically, I am interested in support for lint escapes. E.g. I had a markdown

<!-- markdownlint-disable-next-line first-line-heading -->
Some content

I had the <!-- markdownlint-disable-next-line first-line-heading --> so the linter wouldn't complain about not heading line since the content is auto generated from an include. But mdformat introduces a newline and the linter no longer knows to skip the next line.

<!-- markdownlint-disable-next-line first-line-heading -->

Some content

Is there a way we can work around this?

Related, markdownlint allows custom globs for passing in markdown files that don't end in .md. I think running mdformat at the command line allows for passing in arbitrary files, but can something like that be added to the pre-commit hook as well?

Proposal

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions