UNPKG

useful-handlebars-helpers

Version:

More than 150 Handlebars helpers in 17 categories. Works in browsers and in Node.js.

27 lines (22 loc) 571 B
'use strict'; const helperMarkdown = require('../helper-markdown'); const helpers = module.exports; /** * Block helper that converts a string of inline markdown to HTML. * Code blocks do not have syntax highlighting. * * ```handlebars * {{#markdownToHTML}} * # Foo * {{/markdownToHTML}} * <!-- results in: <h1>Foo</h1> --> * ``` * @param {Object} `context` * @param {Object} `options` * @return {String} * @block * @api public */ helpers.markdownToHTML = function(markdown, context, options) { return helperMarkdown()(markdown, context, options); };