https://github.com/noyobo/prettier-markdown
🔖 Markdown ➡️ prettier ➡️ Formatted Code ➡️ Markdown ✨
https://github.com/noyobo/prettier-markdown
formater markdown prettier
Last synced: 5 months ago
JSON representation
🔖 Markdown ➡️ prettier ➡️ Formatted Code ➡️ Markdown ✨
- Host: GitHub
- URL: https://github.com/noyobo/prettier-markdown
- Owner: noyobo
- Archived: true
- Created: 2017-03-28T15:57:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-28T05:48:14.000Z (about 7 years ago)
- Last Synced: 2024-11-30T15:53:52.089Z (5 months ago)
- Topics: formater, markdown, prettier
- Language: JavaScript
- Homepage:
- Size: 337 KB
- Stars: 93
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Prettier Markdown
=================# Deprecate!Please use own [prettier](https://github.com/prettier/prettier), already supports markdown. 2018-01-10
[](https://travis-ci.org/noyobo/prettier-markdown) [](https://codecov.io/gh/noyobo/prettier-markdown/branch/master) [](https://www.npmjs.org/package/prettier-markdown) [](https://npmjs.org/package/prettier-markdown)
[Prettier](https://github.com/prettier/prettier) JavaScript code in markdown.
#### before / after

## Usage
```
yarn global add prettier-markdown
``````
npm install [-g] prettier-markdown
```## CLI
Run prettier-markdown through the CLI with this script.
```bash
prettier-markdown ./**/*.md# Short command
pmd ./**/*.md
```## API
If has `callback` argument, otherwise return a Promise object.
`prettierMarkdown(markdownFile [,options] [, callback])`
```js
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);
```