GithubHelp home page GithubHelp logo

isabella232 / remark-word-wrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from remarkjs/remark-word-wrap

0.0 0.0 0.0 22 KB

Please use something like https://github.com/prettier/prettier instead

License: MIT License

JavaScript 61.77% GCC Machine Description 38.23%

remark-word-wrap's Introduction

remark-word-wrap Build Status NPM version Dependency Status

Wrap lines of Markdown to a specified width.

Install

With npm do:

npm install remark-word-wrap

Example

var remark = require('remark');
var wrap = require('remark-word-wrap');
var markdown = 'Hello, world!';
var result = remark().use(wrap, {width: 5}).process(markdown);

Output:

Hello,
world!

API

Add extra line breaks to paragraph nodes to ensure that they fit to a specified width.

remark.use(wrap, [options])

options

indent

Type: string Default: '' (empty)

Prepend this string to the start of each line.

newline

Type: string Default: \n

Append this string to the end of each line.

width

Type: number Default: 72

The maximum length of the line. Note that this does not include additional characters from elements like lists.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs

remark-word-wrap's People

Contributors

ben-eb avatar greenkeeperio-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.