All Projects β†’ jonschlinkert β†’ pretty-remarkable

jonschlinkert / pretty-remarkable

Licence: MIT License
Plugin for prettifying markdown with https://github.com/jonschlinkert/remarkable using custom renderer rules.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pretty-remarkable

Atom Beautify
πŸ“£ Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | πŸ’„ Universal beautification package for Atom editor (⚠️ Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding ❀️ )
Stars: ✭ 1,501 (+6722.73%)
Mutual labels:  formatter, beautify, prettify
Vim Autoformat
Provide easy code formatting in Vim by integrating existing code formatters.
Stars: ✭ 2,000 (+8990.91%)
Mutual labels:  formatter, beautify, prettify
Uncrustify
Code beautifier
Stars: ✭ 2,442 (+11000%)
Mutual labels:  formatter, format, beautify
teks
Easily get custom go template based outputs to your command-line tool. Like in docker/kubernetes
Stars: ✭ 41 (+86.36%)
Mutual labels:  formatter, format
Mbeautifier
MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.
Stars: ✭ 248 (+1027.27%)
Mutual labels:  formatter, beautify
lit-date
Light-weight, faster datetime formatter for modern browsers.
Stars: ✭ 33 (+50%)
Mutual labels:  formatter, format
vscode-liquid
πŸ’§Liquid language support for VS Code
Stars: ✭ 137 (+522.73%)
Mutual labels:  formatter, prettify
celldown.js
Small javascript library for manipulating markdown tables
Stars: ✭ 17 (-22.73%)
Mutual labels:  gfm, beautify
Sublime-Pretty-Shell
🐚 Shell Script Formatter / Syntax Checker (Powered by shfmt)
Stars: ✭ 28 (+27.27%)
Mutual labels:  formatter, beautify
format-date
πŸ“† A small library (around 400 B when gziped & minified) to format JavaScript `Date` object using same tokens as moment.
Stars: ✭ 25 (+13.64%)
Mutual labels:  formatter, format
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (+31.82%)
Mutual labels:  formatter, prettify
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-13.64%)
Mutual labels:  formatter, format
Pp sql
Rails ActiveRecord SQL queries log beautifier
Stars: ✭ 223 (+913.64%)
Mutual labels:  formatter, beautify
vim-prismo
A Vim plugin to decorate your commented titles.
Stars: ✭ 21 (-4.55%)
Mutual labels:  beautify, prettify
atom-perfectionist
Beautify CSS and SCSS
Stars: ✭ 19 (-13.64%)
Mutual labels:  formatter, beautify
winston-dev-console
Winston@3 console format aimed to improve development UX
Stars: ✭ 88 (+300%)
Mutual labels:  formatter, format
Translatedjs
Internationalization and localization for JavaScript and Node.js
Stars: ✭ 17 (-22.73%)
Mutual labels:  formatter, format
Brazilian Utils
Utils library for specific Brazilian businesses
Stars: ✭ 1,023 (+4550%)
Mutual labels:  formatter, format
googlejavaformat-action
GitHub Action that formats Java files following Google Style guidelines
Stars: ✭ 66 (+200%)
Mutual labels:  formatter, format
unicode-formatter
Convert portions of text to fancy text using unicode fonts for use on Twitter and other sites that don't support rich text
Stars: ✭ 31 (+40.91%)
Mutual labels:  formatter, format

pretty-remarkable NPM version NPM monthly downloads NPM total downloads Linux Build Status

Plugin for prettifying markdown with Remarkable using custom renderer rules.

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❀️ and support.

(TOC generated by verb using markdown-toc)

Install

Install with npm:

$ npm install --save pretty-remarkable

Usage

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

Examples

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:

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

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

Is normalized to:

Before

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

After

Unordered lists

Normalizes unordered lists.

Example

* a
* b
  * c
  * d
    * e
    * f

Is normalized to:

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

Ordered lists

Normalizes ordered lists.

Example

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

Is normalized to:

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

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Related projects

You might also be interested in these projects:

Author

Jon Schlinkert

License

Copyright Β© 2018, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on July 05, 2018.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].