"use strict";
/*************************************************************************
 *
 * Troven CONFIDENTIAL
 * __________________
 *
 *  (c) 2017-2020 Troven Pty Ltd
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Troven Pty Ltd and its licensors,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Troven Pty Ltd
 * and its suppliers and may be covered by International and Regional Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Troven Pty Ltd.
 */
Object.defineProperty(exports, "__esModule", { value: true });
const showdown = require("showdown");
const Handlebars = require("handlebars");
const Markdown_1 = require("../middleware/Markdown");
const PlantUML_1 = require("../middleware/PlantUML");
class MarkdownPlugin {
    constructor() {
        this.name = "markdown";
        this.title = "Render using Markdown";
    }
    install(_context, _options) {
        let markdown = new showdown.Converter();
        Handlebars.registerHelper('md', function (text) {
            let html = markdown.makeHtml(text);
            return html;
        });
        _context.middleware.set(new Markdown_1.default);
        _context.middleware.set(new PlantUML_1.default);
    }
}
exports.default = MarkdownPlugin;
;
//# sourceMappingURL=MarkdownPlugin.js.map