GithubHelp home page GithubHelp logo

markdownlint's Introduction

Issues on deck Travis build status Gem Version

Markdown lint tool

A tool to check markdown files and flag style issues.

Installation

Markdownlint is written in ruby and is distributed as a rubygem. As long as you have a relatively up to date ruby on your system, markdownlint will be simple to install and use.

To install from rubygems, run:

gem install mdl

To install the latest development version from github:

git clone https://github.com/mivok/markdownlint
cd markdownlint
rake install

Usage

To have markdownlint check your markdown files, simply run mdl with the filenames as a parameter:

mdl README.md

Markdownlint can also take a directory, and it will scan all markdown files within the directory (and nested directories):

mdl docs/

If you don't specify a filename, markdownlint will use stdin:

cat foo.md | mdl

Markdownlint will output a list of issues it finds, and the line number where the issue is. See RULES.md for information on each issue, as well as how to correct it:

README.md:1: MD013 Line length
README.md:70: MD029 Ordered list item prefix
README.md:71: MD029 Ordered list item prefix
README.md:72: MD029 Ordered list item prefix
README.md:73: MD029 Ordered list item prefix

Markdownlint has many more options you can pass on the command line, run mdl --help to see what they are, or see the documentation on configuring markdownlint.

Styles

Not everyone writes markdown in the same way, and there are multiple flavors and styles, each of which are valid. While markdownlint's default settings will result in markdown files that reflect the author's preferred markdown authoring preferences, your project may have different guidelines.

It's not markdownlint's intention to dictate any one specific style, and in order to support these differing styles and/or preferences, markdownlint supports what are called 'style files'. A style file is a file describing which rules markdownlint should enable, and also what settings to apply to individual rules. For example, rule MD013 checks for long lines, and by default will report an issue for any line longer than 80 characters. If your project has a different maximum line length limit, or if you don't want to enforce a line limit at all, then this can be configured in a style file.

For more information on creating style files, see the creating styles document.

Contributing

  1. Fork it ( http://github.com/mivok/markdownlint/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

markdownlint's People

Contributors

cirosantilli avatar davidanson avatar lloeki avatar mivok avatar mjankowski avatar waffle-iron avatar wfleming avatar xi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.