<commit_before># pretty-remarkable [![NPM version](https://img.shields.io/npm/v/pretty-remarkable.svg?style=flat)](https://www.npmjs.com/package/pretty-remarkable) [![NPM downloads](https://img.shields.io/npm/dm/pretty-remarkable.svg?style=flat)](https://npmjs.org/package/pretty-remarkable) [![Build Status](https://img.shields.io/travis/jonschlinkert/pretty-remarkable.svg?style=flat)](https://travis-ci.org/jonschlinkert/pretty-remarkable)

Plugin for prettifying markdown with Remarkable using custom renderer rules.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install pretty-remarkable --save
```

## Usage

```js
var prettify = require('pretty-remarkable');
```

## Examples

```js
var prettify = require('pretty-remarkable');
var Remarkable = require('remarkable');
var md = new Remarkable();

// register the plugin
md.use(prettify);
var result = md.render('\n\n\n# foo\n\n\nbar\n# baz');
//=> '# foo\n\nbar\n\n# baz'
```

Or create a function if you need to export it or need a more reusable format:

```js
var prettify = require('pretty-remarkable');
var Remarkable = require('remarkable');

function pretty(str, options) {
  return new Remarkable()
    .use(prettify)
    .render(str);
}

pretty('\n\n\n# foo\n\n\nbar\n# baz');
//=> '# foo\n\nbar\n\n# baz'
```

## Formatting

In addition to the formatting mentioned in the following sections:

* does not modify `code` or gfm code blocks
* ensures that an extra newline precedes gfm code blocks, since some text editors do not display proper hightlighting otherwise
* unless `options.condense` is false, condenses 3+ newlines down to two

### Tables

Normalizes table formatting.

**Example**

```markdown
Before
**A**|**B**|**C**
---:|:---|---
a |b |c
x |y |z
After
```

Is normalized to:

```markdown
Before

| **A** | **B** | **C** | 
| ---: | :--- | --- |
| a | b | c |
| x | y | z |

After
```

### Unordered lists

Normalizes unordered lists.

**Example**

```markdown
* a
* b
  * c
  * d
    * e
    * f
```

Is normalized to:

```markdown
* a
* b
  - c
  - d
    + e
    + f
```

### Ordered lists

Normalizes ordered lists.

**Example**

```markdown
1. foo
  a. aaa
  b. bbb
  c. ccc
1. bar
1. baz
```

Is normalized to:

```markdown
1. foo
  a. aaa
  b. bbb
  c. ccc
2. bar
3. baz
```

## Related projects

You might also be interested in these projects:

* [markdown-toc](https://www.npmjs.com/package/markdown-toc): Generate a markdown TOC (table of contents) with Remarkable. | [homepage](https://github.com/jonschlinkert/markdown-toc)
* [markdown-utils](https://www.npmjs.com/package/markdown-utils): Micro-utils for creating markdown snippets. | [homepage](https://github.com/jonschlinkert/markdown-utils)
* [prettify-markdown](https://www.npmjs.com/package/prettify-markdown): Prettify, format or beautify your markdown. Whatever you want to call it, this does that.… [more](https://www.npmjs.com/package/prettify-markdown) | [homepage](https://github.com/jonschlinkert/prettify-markdown)
* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://www.npmjs.com/package/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable)

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pretty-remarkable/issues/new).

## Building docs

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install verb && npm run docs
```

Or, if [verb](https://github.com/verbose/verb) is installed globally:

```sh
$ verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**<NAME>**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2016, [<NAME>](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/pretty-remarkable/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 23, 2016._<commit_msg>generate docs<commit_after># pretty-remarkable [![NPM version](https://img.shields.io/npm/v/pretty-remarkable.svg?style=flat)](https://www.npmjs.com/package/pretty-remarkable) [![NPM downloads](https://img.shields.io/npm/dm/pretty-remarkable.svg?style=flat)](https://npmjs.org/package/pretty-remarkable) [![Build Status](https://img.shields.io/travis/jonschlinkert/pretty-remarkable.svg?style=flat)](https://travis-ci.org/jonschlinkert/pretty-remarkable)

Plugin for prettifying markdown with Remarkable using custom renderer rules.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install pretty-remarkable --save
```

## Usage

```js
var prettify = require('pretty-remarkable');
```

## Examples

```js
var prettify = require('pretty-remarkable');
var Remarkable = require('remarkable');
var md = new Remarkable();

// register the plugin
md.use(prettify);
var result = md.render('\n\n\n# foo\n\n\nbar\n# baz');
//=> '# foo\n\nbar\n\n# baz'
```

Or create a function if you need to export it or need a more reusable format:

```js
var prettify = require('pretty-remarkable');
var Remarkable = require('remarkable');

function pretty(str, options) {
  return new Remarkable()
    .use(prettify)
    .render(str);
}

pretty('\n\n\n# foo\n\n\nbar\n# baz');
//=> '# foo\n\nbar\n\n# baz'
```

## Formatting

In addition to the formatting mentioned in the following sections:

* does not modify `code` or gfm code blocks
* ensures that an extra newline precedes gfm code blocks, since some text editors do not display proper hightlighting otherwise
* unless `options.condense` is false, condenses 3+ newlines down to two

### Tables

Normalizes table formatting.

**Example**

```markdown
Before
**A**|**B**|**C**
---:|:---|---
a |b |c
x |y |z
After
```

Is normalized to:

```markdown
Before

| **A** | **B** | **C** | 
| ---: | :--- | --- |
| a | b | c |
| x | y | z |

After
```

### Unordered lists

Normalizes unordered lists.

**Example**

```markdown
* a
* b
  * c
  * d
    * e
    * f
```

Is normalized to:

```markdown
* a
* b
  - c
  - d
    + e
    + f
```

### Ordered lists

Normalizes ordered lists.

**Example**

```markdown
1. foo
  a. aaa
  b. bbb
  c. ccc
1. bar
1. baz
```

Is normalized to:

```markdown
1. foo
  a. aaa
  b. bbb
  c. ccc
2. bar
3. baz
```

## Related projects

You might also be interested in these projects:

* [markdown-toc](https://www.npmjs.com/package/markdown-toc): Generate a markdown TOC (table of contents) with Remarkable. | [homepage](https://github.com/jonschlinkert/markdown-toc)
* [markdown-utils](https://www.npmjs.com/package/markdown-utils): Micro-utils for creating markdown snippets. | [homepage](https://github.com/jonschlinkert/markdown-utils)
* [prettify-markdown](https://www.npmjs.com/package/prettify-markdown): Prettify, format or beautify your markdown. Whatever you want to call it, this does that.… [more](https://www.npmjs.com/package/prettify-markdown) | [homepage](https://github.com/jonschlinkert/prettify-markdown)
* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://www.npmjs.com/package/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable)

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/pretty-remarkable/issues/new).

## Building docs

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install verb && npm run docs
```

Or, if [verb](https://github.com/verbose/verb) is installed globally:

```sh
$ verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**<NAME>**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2016, [<NAME>](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/pretty-remarkable/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 25, 2016._
{'fraction_non_alphanumeric': 0.1715033301617507, 'fraction_numerical': 0.005470980019029496, 'mean_word_length': 4.13997555012225, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 48, 'lorem ipsum': 0, 'www.': 16, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2158464', 'n_tokens_mistral': 3113, 'n_tokens_neox': 2873, 'n_words': 734}