angular-markdown-it
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
(function(window, angular, markdownit) { | ||
(function(window, angular) { | ||
'use strict'; | ||
@@ -17,5 +17,10 @@ function markdownItProvider() { | ||
}, | ||
$get: function() { | ||
$get: [ '$log', function($log) { | ||
var markdownit = window.markdownit; | ||
if (angular.isUndefined(markdownit)) { | ||
$log.error('angular-markdown-it: markdown-it not loaded.'); | ||
return; | ||
} | ||
return markdownit(presetName, options); | ||
} | ||
} ] | ||
}; | ||
@@ -46,5 +51,3 @@ } | ||
} | ||
angular.module('mdMarkdownIt', ['ngSanitize']) | ||
.provider('markdownItConverter', markdownItProvider) | ||
.directive('markdownIt', ['$sanitize', 'markdownItConverter', markdownItDirective]); | ||
})(window, window.angular, window.markdownit); | ||
angular.module('mdMarkdownIt', [ 'ngSanitize' ]).provider('markdownItConverter', markdownItProvider).directive('markdownIt', [ '$sanitize', 'markdownItConverter', markdownItDirective ]); | ||
})(window, window.angular); |
@@ -1,2 +0,2 @@ | ||
!function(n,t,r){"use strict";function i(){var n={},i="default";return{config:function(r,e){t.isString(r)&&t.isObject(e)?(i=r,n=e):t.isString(r)?i=r:t.isObject(r)&&(n=r)},$get:function(){return r(i,n)}}}function e(n,t){var r="markdownIt",i=function(r){return r?n(t.render(r)):""},e=function(n,t,e){e[r]?n.$watch(r,function(n){t.html(i(n))}):t.html(i(t.text()))};return{restrict:"AE",scope:{markdownIt:"="},replace:!0,link:e}}t.module("mdMarkdownIt",["ngSanitize"]).provider("markdownItConverter",i).directive("markdownIt",["$sanitize","markdownItConverter",e])}(window,window.angular,window.markdownit); | ||
!function(n,t){"use strict";function r(){var r={},i="default";return{config:function(n,e){t.isString(n)&&t.isObject(e)?(i=n,r=e):t.isString(n)?i=n:t.isObject(n)&&(r=n)},$get:["$log",function(e){var o=n.markdownit;return t.isUndefined(o)?void e.error("angular-markdown-it: markdown-it not loaded."):o(i,r)}]}}function i(n,t){var r="markdownIt",i=function(r){return r?n(t.render(r)):""},e=function(n,t,e){e[r]?n.$watch(r,function(n){t.html(i(n))}):t.html(i(t.text()))};return{restrict:"AE",scope:{markdownIt:"="},replace:!0,link:e}}t.module("mdMarkdownIt",["ngSanitize"]).provider("markdownItConverter",r).directive("markdownIt",["$sanitize","markdownItConverter",i])}(window,window.angular); | ||
//# sourceMappingURL=ng-markdownit.min.js.map |
{ | ||
"name": "angular-markdown-it", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "Angular directive for rendering markdown with markdown-it.", | ||
@@ -23,6 +23,6 @@ "repository": { | ||
"karma": "^0.13", | ||
"karma-chrome-launcher": "^0.2", | ||
"karma-coverage": "^0.5.2", | ||
"karma-firefox-launcher": "^0.1", | ||
"karma-jasmine": "^0.3", | ||
"karma-chrome-launcher": "^1.0", | ||
"karma-coverage": "^1.0", | ||
"karma-firefox-launcher": "^1.0", | ||
"karma-jasmine": "^1.0", | ||
"uglifyjs": "^2.4" | ||
@@ -29,0 +29,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10640
3.46%93
2.2%