'use strict';

angular.module('gisto.filter.markDown', []).filter('markDown', function ($compile, $rootScope) {
    return function (input) {
        if (typeof input === 'undefined') {
            return;
        } else {
            var converter = new Showdown.converter();
            var html = converter.makeHtml(input);
            html = html.replace(/href="(.*)"/gi, function (match, p1) {
                return 'onclick="gui.Shell.openExternal(\'' + p1 + '\')"';
            });
            return html;
        }
    };
})
'use strict';

angular.module('gisto.filter.markDown', []).filter('markDown', function () {
    return function (input) {
        if (typeof input === 'undefined') {
            return;
        } else {
            var converter = new Showdown.converter();
            var html = converter.makeHtml(input);
            html = html.replace(/href="(.*)"/gi, function (match, p1) {
                return 'onclick="gui.Shell.openExternal(\'' + p1 + '\')"';
            });
            return html;
        }
    };
})
IMPROVE (markdown links): Remove unused injected services.
IMPROVE (markdown links): Remove unused injected services.
