Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noyobo/prettier-markdown
🔖 Markdown ➡️ prettier ➡️ Formatted Code ➡️ Markdown ✨
https://github.com/noyobo/prettier-markdown
formater markdown prettier
Last synced: about 1 month 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-28T05:48:14.000Z (almost 7 years ago)
- Last Synced: 2024-11-30T15:53:52.089Z (about 2 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.svg?branch=master)](https://travis-ci.org/noyobo/prettier-markdown) [![Codecov](https://img.shields.io/codecov/c/github/noyobo/prettier-markdown/master.svg)](https://codecov.io/gh/noyobo/prettier-markdown/branch/master) [![npm package](https://img.shields.io/npm/v/prettier-markdown.svg)](https://www.npmjs.org/package/prettier-markdown) [![NPM downloads](http://img.shields.io/npm/dm/prettier-markdown.svg)](https://npmjs.org/package/prettier-markdown)
[Prettier](https://github.com/prettier/prettier) JavaScript code in markdown.
#### before / after
![compare](./snapshots/compare.png)
## 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);
```