Skip to content
This repository has been archived by the owner on Jun 23, 2019. It is now read-only.
/ prettier-markdown Public archive

🔖 Markdown ➡️ prettier ➡️ Formatted Code ➡️ Markdown ✨

Notifications You must be signed in to change notification settings

noyobo/prettier-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prettier Markdown

Deprecate!Please use own prettier, already supports markdown. 2018-01-10

Codecov npm package NPM downloads

Prettier JavaScript code in markdown.

before / after

compare

Usage

yarn global add prettier-markdown
npm install [-g] prettier-markdown

CLI

Run prettier-markdown through the CLI with this script.

prettier-markdown ./**/*.md

# Short command
pmd ./**/*.md

API

If has callback argument, otherwise return a Promise object.

prettierMarkdown(markdownFile [,options] [, callback])

const prettierMarkdown = require('prettier-markdown');

prettierMarkdown('./foo.md', function(err, msg) {
  console.log(msg);
});

// promise
const promise = prettierMarkdown(
  './foo.md',
  {
    /* options */
  }
);
promise.then(msg => console.log);

About

🔖 Markdown ➡️ prettier ➡️ Formatted Code ➡️ Markdown ✨

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published