0.0.8 • Published 8 years ago

assemble-helper-breaklines v0.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

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 2016 & MIT © Rolando Quintero