Like gofmt
, but for Markdown.
Note that markdownfmt
works with pure Markdown files. If you want to use it with Markdown files that have front matter, consider one of alternatives that supports that.
go install github.com/shurcooL/markdownfmt@latest
usage: markdownfmt [flags] [path ...]
-d display diffs instead of rewriting files
-l list files whose formatting differs from markdownfmt's
-w write result to (source) file instead of stdout
- vim-markdownfmt for Vim.
- emacs-markdownfmt for Emacs.
- vscode-markdownfmt for Visual Studio Code.
- Built-in in Conception.
- markdown-format for Atom (deprecated).
- Add a plugin for your favorite editor here?
mdfmt
- Fork ofmarkdownfmt
that adds front matter support.tidy-markdown
- Project with similar goals, but written in JS and based on a slightly different styleguide.- Flowmark - A JS-based Atom plugin with line wrapping, YAML frontmatter support, and other normalization features.