0.1.2 • Published 9 months ago

hbl-cmark v0.1.2

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
9 months ago

hbl-cmark

A helper for Handlebars that adds CommonMark rendering. Meant to supercede helpers/handlebars-helpers`' CommonMark helpers.

Usage

const Handlebars = require('handlebars');
require('hbl-cmark').default(Handlebars);

const tpl = Handlebars.compile('{{#markdown}}I sure **do** love Markdown.{{/markdown}}');
console.log(tpl()); // result : '<p>I sure <b>do</b> love Markdown.</p>\n' 

Package documentation

{{# markdown}}

Render Markdown that's within the block.

Usage :

{{#markdown}}
I sure **do love Markdown.**
{{/markdown}}

Result : <p>I sure <b>do</b> love Markdown.</p>\n

{{ md str }}

Usage : {{ md "test.md" }}

Result : <p><em>Neutralis</em></p>\n

Acknowledgements

This package is licensed under the 3-Clause BSD licence. A copy of it can be found in the LICENSE file in the root of the source repository and in the root of the package directory.

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

1 year ago