Skip to content

Latest commit

 

History

History

README.md

@putout/plugin-markdown NPM version

Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents.

(c) markdownguide.org

🐊Putout plugin adds ability to improve markdown.

Install

npm i @putout/plugin-markdown -D

Rules

Config

{
    "rules": {
        "markdown/merge-heading-spaces": "on",
        "markdown/remove-dependencies-status-badge": "on",
        "markdown/remove-trailing-whitespaces-from-heading": "on",
        "markdown/split-link-with-title": "on"
    }
}

merge-heading-spaces

Checkout in 🐊Putout Editor.

❌ Example of incorrect code

# hello  world

✅ Example of correct code

# hello world

split-link-with-title

Add space between title and link. Checkout in 🐊Putout Editor.

# @putout/plugin-apply-replace-all [![NPM version][NPMIMGURL]][NPMURL]
[NPMIMGURL]:                https://img.shields.io/npm/v/@putout/plugin-apply-replace-all.svg?style=flat&longCache=true
-[NPMURL]:                   https://npmjs.org/package/@putout/plugin-apply-replace-all"npm"
+[NPMURL]:                   https://npmjs.org/package/@putout/plugin-apply-replace-all "npm"
-[hello](https://google.com"Google")
+[hello](https://google.com "Google")

remove-dependencies-status-badge

Checkout in 🐊Putout Editor.

-# @putout/plugin-apply-replace-all [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL]
+# @putout/plugin-apply-replace-all [![NPM version][NPMIMGURL]][NPMURL]
[NPMIMGURL]:                https://img.shields.io/npm/v/@putout/plugin-apply-replace-all.svg?style=flat&longCache=true
[NPMURL]:                   https://npmjs.org/package/@putout/plugin-apply-replace-all "npm"
-
-[DependencyStatusURL]:      https://david-dm.org/coderaiser/putout?path=packages/plugin-apply-replace-all
-[DependencyStatusIMGURL]:   https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-apply-replace-all

remove-trailing-whitespaces-from-heading

Checkout in 🐊Putout Editor.

-# @putout/plugin-apply-replace-all [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] hello␣
+# @putout/plugin-apply-replace-all [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] hello

License

MIT