Formatters and linters for Markdown
Keep the Markdown of a repository right.
Formatters and linters for the Markdown of a repository, with one command and one configuration file.
$ markright fmt formatted doc.md markright: 1 file(s) formatted $ markright check doc.md:5: broken anchor: #install (anchors) doc.md:9: broken link: setup.md (links) markright: 2 issue(s)
What it does
- Fix, then check
markright fmt rewrites how headings, lists, emphasis, code, tables and spacing are written, never what they render to; markright check reports everything else, unformatted lines included.
- Links that resolve
Relative links, anchors, reference definitions and the index of the documents, checked against the files and headings that exist.
- CommonMark first
Documents are parsed as CommonMark with the GFM extensions, so code, HTML and lists are read the way a renderer reads them.
- One configuration
.markright.yaml or .markright.toml chooses the rules, their settings and the paths each skips, with a JSON schema for editors.
- Reports for tools
Issues as text, Checkstyle or SARIF, in the file or stream each consumer reads.
- One binary
For Linux, macOS and Windows, in CI or on a laptop, with nothing else to install.