0.0.8 • Published 8 years ago
assemble-helper-breaklines v0.0.8
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
- grunt-init-assemble: Initialize new Assemble projects, with example mixins, helpers, templates and data.
- handlebars-helpers
- Assemble's documentation
- assemble-less
- assemble-examples
Author
Copyright and license
Copyright 2016 & MIT © Rolando Quintero