Like gofmt, but for Markdown.
Branch: master
Clone or download
2
Latest commit 5ba28a0 Jun 25, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
markdown markdown: Omit repeated []byte types in method signatures. (#43) Jun 25, 2018
.travis.yml Travis: Use latest stable Go (1.7 at this time). Dec 23, 2016
README.md Travis: Update to Go 1.7. Sep 8, 2016
main.go Don't call os.Exit(2) in usage. Feb 14, 2017

README.md

markdownfmt

Build Status GoDoc

Like gofmt, but for Markdown.

Markdown Format Demo

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.

Installation

go get -u github.com/shurcooL/markdownfmt

Add $GOPATH/bin to your $PATH or copy $GOPATH/bin/markdownfmt to your $PATH.

Usage

usage: markdownfmt [flags] [path ...]
  -d=false: display diffs instead of rewriting files
  -l=false: list files whose formatting differs from markdownfmt's
  -w=false: write result to (source) file instead of stdout

Editor Plugins

Alternatives

  • mdfmt - Fork of markdownfmt that adds front matter support.
  • tidy-markdown - Project with similar goals, but written in JS and based on a slightly different styleguide.

License