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.

A run in a repository
$ 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

  1. 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.

  2. Links that resolve

    Relative links, anchors, reference definitions and the index of the documents, checked against the files and headings that exist.

  3. CommonMark first

    Documents are parsed as CommonMark with the GFM extensions, so code, HTML and lists are read the way a renderer reads them.

  4. One configuration

    .markright.yaml or .markright.toml chooses the rules, their settings and the paths each skips, with a JSON schema for editors.

  5. Reports for tools

    Issues as text, Checkstyle or SARIF, in the file or stream each consumer reads.

  6. One binary

    For Linux, macOS and Windows, in CI or on a laptop, with nothing else to install.

Every rule

Settings

Appearance

ThemeColours of every page

Reading

Code blocksLines longer than the block
TablesCells wider than the page

Accessibility

Text sizeEvery page, in proportion
LinksLinks inside the text
MotionAnimations and smooth scrolling
ScrollbarsCode blocks, tables and other scrolling areas