assemble-helper-breaklines

0.0.8 • Public • Published

assemble-helper-breaklines

This helper allows you transform the regular breakline notation \n, into html tag <br />, if it's present on the data-json file.

Install

  • Install the module and save to devDependcies
$ npm install assemble-helper-breaklines --save-dev
  • Add the module name into the Gruntfile.js options
options: { helpers: ['*-helper-breaklines'] } }
  • Enjoy

Usage

<p>{{breaklines textdata}}</p>

Example

JSON file with a regular breakline notation (\n)

[{
    "user-nickname": "R.Quintero",
    "user-location": "",
    "review-text": "this helper 'helped me' a lot \n and I can use it EVERYWHERE!",
    "rating": 5
}]

Result

    <p> this helper 'helped me' a lot <br /> and I can use it EVERYWHERE! </p>

Related info

Author

Rolando Quintero

Copyright and license

Copyright 2013 Jon Schlinkert

Copyright and license

Copyright 2016 & MIT © Rolando Quintero

Package Sidebar

Install

npm i assemble-helper-breaklines

Weekly Downloads

2

Version

0.0.8

License

MIT

Last publish

Collaborators

  • rquintero