Socket
Socket
Sign inDemoInstall

ngx-markdown

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-markdown - npm Package Compare versions

Comparing version 11.1.2 to 11.1.3

6

bundles/ngx-markdown.umd.js

@@ -18,2 +18,8 @@ (function (global, factory) {

LanguagePipe.prototype.transform = function (value, language) {
if (value == null) {
value = '';
}
if (language == null) {
language = '';
}
if (typeof value !== 'string') {

@@ -20,0 +26,0 @@ console.error("LanguagePipe has been invoked with an invalid value type [" + value + "]");

2

bundles/ngx-markdown.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/common/http"),require("@angular/platform-browser"),require("marked"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngx-markdown",["exports","@angular/core","@angular/common","@angular/common/http","@angular/platform-browser","marked","rxjs/operators"],t):t((e=e||self)["ngx-markdown"]={},e.ng.core,e.ng.common,e.ng.common.http,e.ng.platformBrowser,e.marked,e.rxjs.operators)}(this,(function(e,t,n,r,o,i,a){"use strict";var s=function(){},u=function(){function e(){}return e.prototype.transform=function(e,t){return"string"!=typeof e?(console.error("LanguagePipe has been invoked with an invalid value type ["+e+"]"),e):"string"!=typeof t?(console.error("LanguagePipe has been invoked with an invalid parameter ["+t+"]"),e):"```"+t+"\n"+e+"\n```"},e}();u.decorators=[{type:t.Pipe,args:[{name:"language"}]}];Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}Object.create;var c,h=function(){},f="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",d="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",m="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",g=new t.InjectionToken("SECURITY_CONTEXT"),y=function(){function e(e,t,n,r,o){this.platform=e,this.securityContext=t,this.http=n,this.sanitizer=o,this.initialMarkedOptions={renderer:new i.Renderer},this.options=r}return Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=Object.assign(Object.assign({},this.initialMarkedOptions),e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.options.renderer},set:function(e){this.options.renderer=e},enumerable:!1,configurable:!0}),e.prototype.compile=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=this.options);var o=this.trimIndentation(e),a=t?this.decodeHtml(o):o,s=n?this.renderEmoji(a):a,u=i.parse(s,r);return this.sanitizer.sanitize(this.securityContext,u)||""},e.prototype.getSource=function(e){var t=this;if(!this.http)throw new Error(m);return this.http.get(e,{responseType:"text"}).pipe(a.map((function(n){return t.handleExtension(e,n)})))},e.prototype.highlight=function(e){if(n.isPlatformBrowser(this.platform)&&"undefined"!=typeof Prism){e||(e=document);var t=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(t,(function(e){return e.classList.add("language-none")})),Prism.highlightAllUnder(e)}},e.prototype.renderKatex=function(e,t){if(!n.isPlatformBrowser(this.platform))return e;if("undefined"==typeof katex||void 0===katex.renderToString)throw new Error(d);return e.replace(/\$([^\s][^$]*?[^\s])\$/gm,(function(e,n){return katex.renderToString(n,t)}))},e.prototype.decodeHtml=function(e){if(!n.isPlatformBrowser(this.platform))return e;var t=document.createElement("textarea");return t.innerHTML=e,t.value},e.prototype.handleExtension=function(e,t){var n=e?e.split("?")[0].split(".").splice(-1).join():null;return"md"!==n?"```"+n+"\n"+t+"\n```":t},e.prototype.renderEmoji=function(e){if(!n.isPlatformBrowser(this.platform))return e;if("undefined"==typeof joypixels||void 0===joypixels.shortnameToUnicode)throw new Error(f);return joypixels.shortnameToUnicode(e)},e.prototype.trimIndentation=function(e){return e?e.split("\n").map((function(e){var n=t;return e.length>0&&(n=isNaN(n)?e.search(/\S|$/):Math.min(e.search(/\S|$/),n)),isNaN(t)&&(t=n),n?e.substring(n):e})).join("\n"):"";var t},e}();y.decorators=[{type:t.Injectable}],y.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:t.SecurityContext,decorators:[{type:t.Inject,args:[g]}]},{type:r.HttpClient,decorators:[{type:t.Optional}]},{type:h,decorators:[{type:t.Optional}]},{type:o.DomSanitizer}]},(c=e.PrismPlugin||(e.PrismPlugin={})).LineHighlight="line-highlight",c.LineNumbers="line-numbers";var v=function(){function n(e,n){this.element=e,this.markdownService=n,this.error=new t.EventEmitter,this.load=new t.EventEmitter,this.ready=new t.EventEmitter,this._emoji=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1}return Object.defineProperty(n.prototype,"emoji",{get:function(){return this._emoji},set:function(e){this._emoji=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"katex",{get:function(){return this._katex},set:function(e){this._katex=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lineHighlight",{get:function(){return this._lineHighlight},set:function(e){this._lineHighlight=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lineNumbers",{get:function(){return this._lineNumbers},set:function(e){this._lineNumbers=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),n.prototype.ngOnChanges=function(){null==this.data?null==this.src||this.handleSrc():this.handleData()},n.prototype.ngAfterViewInit=function(){this.data||this.src||this.handleTransclusion()},n.prototype.render=function(e,t){void 0===t&&(t=!1);var n=this.markdownService.compile(e,t,this.emoji);n=this.katex?this.markdownService.renderKatex(n,this.katexOptions):n,this.element.nativeElement.innerHTML=n,this.handlePlugins(),this.markdownService.highlight(this.element.nativeElement),this.ready.emit()},n.prototype.coerceBooleanProperty=function(e){return null!=e&&""+e!="false"},n.prototype.handleData=function(){this.render(this.data)},n.prototype.handleSrc=function(){var e=this;this.markdownService.getSource(this.src).subscribe((function(t){e.render(t),e.load.emit(t)}),(function(t){return e.error.emit(t)}))},n.prototype.handleTransclusion=function(){this.render(this.element.nativeElement.innerHTML,!0)},n.prototype.handlePlugins=function(){this.lineHighlight&&(this.setPluginClass(this.element.nativeElement,e.PrismPlugin.LineHighlight),this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset})),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,e.PrismPlugin.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))},n.prototype.setPluginClass=function(e,t){for(var n,r=e.querySelectorAll("pre"),o=0;o<r.length;o++){var i=t instanceof Array?t:[t];(n=r.item(o).classList).add.apply(n,p(i))}},n.prototype.setPluginOptions=function(e,t){for(var n=this,r=e.querySelectorAll("pre"),o=function(e){Object.keys(t).forEach((function(o){var i=t[o];if(i){var a=n.toLispCase(o);r.item(e).setAttribute(a,i.toString())}}))},i=0;i<r.length;i++)o(i)},n.prototype.toLispCase=function(e){var t=e.match(/([A-Z])/g);if(!t)return e;for(var n=e.toString(),r=0,o=t.length;r<o;r++)n=n.replace(new RegExp(t[r]),"-"+t[r].toLowerCase());return"-"===n.slice(0,1)&&(n=n.slice(1)),n},n}();v.decorators=[{type:t.Component,args:[{selector:"markdown, [markdown]",template:"<ng-content></ng-content>"}]}],v.ctorParameters=function(){return[{type:t.ElementRef},{type:y}]},v.propDecorators={data:[{type:t.Input}],src:[{type:t.Input}],emoji:[{type:t.Input}],katex:[{type:t.Input}],katexOptions:[{type:t.Input}],lineHighlight:[{type:t.Input}],line:[{type:t.Input}],lineOffset:[{type:t.Input}],lineNumbers:[{type:t.Input}],start:[{type:t.Input}],error:[{type:t.Output}],load:[{type:t.Output}],ready:[{type:t.Output}]};var b=function(){function e(e,t,n){this.elementRef=e,this.markdownService=t,this.zone=n}return e.prototype.transform=function(e){var t=this;if(null==e)return"";if("string"!=typeof e)return console.error("MarkdownPipe has been invoked with an invalid value type ["+e+"]"),e;var n=this.markdownService.compile(e);return this.zone.onStable.pipe(a.first()).subscribe((function(){return t.markdownService.highlight(t.elementRef.nativeElement)})),n},e}();b.decorators=[{type:t.Pipe,args:[{name:"markdown"}]}],b.ctorParameters=function(){return[{type:t.ElementRef},{type:y},{type:t.NgZone}]};var k=[u,v,b],P=function(){function e(){}return e.forRoot=function(n){return{ngModule:e,providers:[y,n&&n.loader||[],n&&n.markedOptions||[],{provide:g,useValue:n&&null!=n.sanitize?n.sanitize:t.SecurityContext.HTML}]}},e.forChild=function(){return{ngModule:e}},e}();P.decorators=[{type:t.NgModule,args:[{exports:k,declarations:k}]}],Object.defineProperty(e,"MarkedRenderer",{enumerable:!0,get:function(){return i.Renderer}}),e.KatexOptions=s,e.LanguagePipe=u,e.MarkdownComponent=v,e.MarkdownModule=P,e.MarkdownPipe=b,e.MarkdownService=y,e.MarkedOptions=h,e.SECURITY_CONTEXT=g,e.errorJoyPixelsNotLoaded=f,e.errorKatexNotLoaded=d,e.errorSrcWithoutHttpClient=m,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/common/http"),require("@angular/platform-browser"),require("marked"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngx-markdown",["exports","@angular/core","@angular/common","@angular/common/http","@angular/platform-browser","marked","rxjs/operators"],t):t((e=e||self)["ngx-markdown"]={},e.ng.core,e.ng.common,e.ng.common.http,e.ng.platformBrowser,e.marked,e.rxjs.operators)}(this,(function(e,t,n,r,o,i,a){"use strict";var s=function(){},u=function(){function e(){}return e.prototype.transform=function(e,t){return null==e&&(e=""),null==t&&(t=""),"string"!=typeof e?(console.error("LanguagePipe has been invoked with an invalid value type ["+e+"]"),e):"string"!=typeof t?(console.error("LanguagePipe has been invoked with an invalid parameter ["+t+"]"),e):"```"+t+"\n"+e+"\n```"},e}();u.decorators=[{type:t.Pipe,args:[{name:"language"}]}];Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}Object.create;var c,h=function(){},f="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",d="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",m="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",g=new t.InjectionToken("SECURITY_CONTEXT"),y=function(){function e(e,t,n,r,o){this.platform=e,this.securityContext=t,this.http=n,this.sanitizer=o,this.initialMarkedOptions={renderer:new i.Renderer},this.options=r}return Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=Object.assign(Object.assign({},this.initialMarkedOptions),e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this.options.renderer},set:function(e){this.options.renderer=e},enumerable:!1,configurable:!0}),e.prototype.compile=function(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=this.options);var o=this.trimIndentation(e),a=t?this.decodeHtml(o):o,s=n?this.renderEmoji(a):a,u=i.parse(s,r);return this.sanitizer.sanitize(this.securityContext,u)||""},e.prototype.getSource=function(e){var t=this;if(!this.http)throw new Error(m);return this.http.get(e,{responseType:"text"}).pipe(a.map((function(n){return t.handleExtension(e,n)})))},e.prototype.highlight=function(e){if(n.isPlatformBrowser(this.platform)&&"undefined"!=typeof Prism){e||(e=document);var t=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(t,(function(e){return e.classList.add("language-none")})),Prism.highlightAllUnder(e)}},e.prototype.renderKatex=function(e,t){if(!n.isPlatformBrowser(this.platform))return e;if("undefined"==typeof katex||void 0===katex.renderToString)throw new Error(d);return e.replace(/\$([^\s][^$]*?[^\s])\$/gm,(function(e,n){return katex.renderToString(n,t)}))},e.prototype.decodeHtml=function(e){if(!n.isPlatformBrowser(this.platform))return e;var t=document.createElement("textarea");return t.innerHTML=e,t.value},e.prototype.handleExtension=function(e,t){var n=e?e.split("?")[0].split(".").splice(-1).join():null;return"md"!==n?"```"+n+"\n"+t+"\n```":t},e.prototype.renderEmoji=function(e){if(!n.isPlatformBrowser(this.platform))return e;if("undefined"==typeof joypixels||void 0===joypixels.shortnameToUnicode)throw new Error(f);return joypixels.shortnameToUnicode(e)},e.prototype.trimIndentation=function(e){return e?e.split("\n").map((function(e){var n=t;return e.length>0&&(n=isNaN(n)?e.search(/\S|$/):Math.min(e.search(/\S|$/),n)),isNaN(t)&&(t=n),n?e.substring(n):e})).join("\n"):"";var t},e}();y.decorators=[{type:t.Injectable}],y.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:t.SecurityContext,decorators:[{type:t.Inject,args:[g]}]},{type:r.HttpClient,decorators:[{type:t.Optional}]},{type:h,decorators:[{type:t.Optional}]},{type:o.DomSanitizer}]},(c=e.PrismPlugin||(e.PrismPlugin={})).LineHighlight="line-highlight",c.LineNumbers="line-numbers";var v=function(){function n(e,n){this.element=e,this.markdownService=n,this.error=new t.EventEmitter,this.load=new t.EventEmitter,this.ready=new t.EventEmitter,this._emoji=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1}return Object.defineProperty(n.prototype,"emoji",{get:function(){return this._emoji},set:function(e){this._emoji=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"katex",{get:function(){return this._katex},set:function(e){this._katex=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lineHighlight",{get:function(){return this._lineHighlight},set:function(e){this._lineHighlight=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lineNumbers",{get:function(){return this._lineNumbers},set:function(e){this._lineNumbers=this.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),n.prototype.ngOnChanges=function(){null==this.data?null==this.src||this.handleSrc():this.handleData()},n.prototype.ngAfterViewInit=function(){this.data||this.src||this.handleTransclusion()},n.prototype.render=function(e,t){void 0===t&&(t=!1);var n=this.markdownService.compile(e,t,this.emoji);n=this.katex?this.markdownService.renderKatex(n,this.katexOptions):n,this.element.nativeElement.innerHTML=n,this.handlePlugins(),this.markdownService.highlight(this.element.nativeElement),this.ready.emit()},n.prototype.coerceBooleanProperty=function(e){return null!=e&&""+e!="false"},n.prototype.handleData=function(){this.render(this.data)},n.prototype.handleSrc=function(){var e=this;this.markdownService.getSource(this.src).subscribe((function(t){e.render(t),e.load.emit(t)}),(function(t){return e.error.emit(t)}))},n.prototype.handleTransclusion=function(){this.render(this.element.nativeElement.innerHTML,!0)},n.prototype.handlePlugins=function(){this.lineHighlight&&(this.setPluginClass(this.element.nativeElement,e.PrismPlugin.LineHighlight),this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset})),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,e.PrismPlugin.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))},n.prototype.setPluginClass=function(e,t){for(var n,r=e.querySelectorAll("pre"),o=0;o<r.length;o++){var i=t instanceof Array?t:[t];(n=r.item(o).classList).add.apply(n,p(i))}},n.prototype.setPluginOptions=function(e,t){for(var n=this,r=e.querySelectorAll("pre"),o=function(e){Object.keys(t).forEach((function(o){var i=t[o];if(i){var a=n.toLispCase(o);r.item(e).setAttribute(a,i.toString())}}))},i=0;i<r.length;i++)o(i)},n.prototype.toLispCase=function(e){var t=e.match(/([A-Z])/g);if(!t)return e;for(var n=e.toString(),r=0,o=t.length;r<o;r++)n=n.replace(new RegExp(t[r]),"-"+t[r].toLowerCase());return"-"===n.slice(0,1)&&(n=n.slice(1)),n},n}();v.decorators=[{type:t.Component,args:[{selector:"markdown, [markdown]",template:"<ng-content></ng-content>"}]}],v.ctorParameters=function(){return[{type:t.ElementRef},{type:y}]},v.propDecorators={data:[{type:t.Input}],src:[{type:t.Input}],emoji:[{type:t.Input}],katex:[{type:t.Input}],katexOptions:[{type:t.Input}],lineHighlight:[{type:t.Input}],line:[{type:t.Input}],lineOffset:[{type:t.Input}],lineNumbers:[{type:t.Input}],start:[{type:t.Input}],error:[{type:t.Output}],load:[{type:t.Output}],ready:[{type:t.Output}]};var b=function(){function e(e,t,n){this.elementRef=e,this.markdownService=t,this.zone=n}return e.prototype.transform=function(e){var t=this;if(null==e)return"";if("string"!=typeof e)return console.error("MarkdownPipe has been invoked with an invalid value type ["+e+"]"),e;var n=this.markdownService.compile(e);return this.zone.onStable.pipe(a.first()).subscribe((function(){return t.markdownService.highlight(t.elementRef.nativeElement)})),n},e}();b.decorators=[{type:t.Pipe,args:[{name:"markdown"}]}],b.ctorParameters=function(){return[{type:t.ElementRef},{type:y},{type:t.NgZone}]};var k=[u,v,b],P=function(){function e(){}return e.forRoot=function(n){return{ngModule:e,providers:[y,n&&n.loader||[],n&&n.markedOptions||[],{provide:g,useValue:n&&null!=n.sanitize?n.sanitize:t.SecurityContext.HTML}]}},e.forChild=function(){return{ngModule:e}},e}();P.decorators=[{type:t.NgModule,args:[{exports:k,declarations:k}]}],Object.defineProperty(e,"MarkedRenderer",{enumerable:!0,get:function(){return i.Renderer}}),e.KatexOptions=s,e.LanguagePipe=u,e.MarkdownComponent=v,e.MarkdownModule=P,e.MarkdownPipe=b,e.MarkdownService=y,e.MarkedOptions=h,e.SECURITY_CONTEXT=g,e.errorJoyPixelsNotLoaded=f,e.errorKatexNotLoaded=d,e.errorSrcWithoutHttpClient=m,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-markdown.umd.min.js.map
import { Pipe } from '@angular/core';
export class LanguagePipe {
transform(value, language) {
if (value == null) {
value = '';
}
if (language == null) {
language = '';
}
if (typeof value !== 'string') {

@@ -20,2 +26,2 @@ console.error(`LanguagePipe has been invoked with an invalid value type [${value}]`);

];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFuZ3VhZ2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi9saWIvIiwic291cmNlcyI6WyJzcmMvbGFuZ3VhZ2UucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQztBQUtwRCxNQUFNLE9BQU8sWUFBWTtJQUV2QixTQUFTLENBQUMsS0FBYSxFQUFFLFFBQWdCO1FBQ3ZDLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxFQUFFO1lBQzdCLE9BQU8sQ0FBQyxLQUFLLENBQUMsNkRBQTZELEtBQUssR0FBRyxDQUFDLENBQUM7WUFDckYsT0FBTyxLQUFLLENBQUM7U0FDZDtRQUNELElBQUksT0FBTyxRQUFRLEtBQUssUUFBUSxFQUFFO1lBQ2hDLE9BQU8sQ0FBQyxLQUFLLENBQUMsNERBQTRELFFBQVEsR0FBRyxDQUFDLENBQUM7WUFDdkYsT0FBTyxLQUFLLENBQUM7U0FDZDtRQUNELE9BQU8sS0FBSyxHQUFHLFFBQVEsR0FBRyxJQUFJLEdBQUksS0FBSyxHQUFHLE9BQU8sQ0FBQztJQUNwRCxDQUFDOzs7WUFmRixJQUFJLFNBQUM7Z0JBQ0osSUFBSSxFQUFFLFVBQVU7YUFDakIiLCJzb3VyY2VzQ29udG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pZiAodmFsdWUgPT0gbnVsbCkge1xyXG4gICAgICB2YWx1ZSA9ICcnO1xyXG4gICAgfVxyXG4gICAgaWYgKGxhbmd1YWdlID09IG51bGwpIHtcclxuICAgICAgbGFuZ3VhZ2UgPSAnJztcclxuICAgIH1cclxuICAgIGlmICh0eXBlb2YgdmFsdWUgIT09ICdzdHJpbmcnKSB7XHJcbiAgICAgIGNvbnNvbGUuZXJyb3IoYExhbmd1YWdlUGlwZSBoYXMgYmVlbiBpbnZva2VkIHdpdGggYW4gaW52YWxpZCB2YWx1ZSB0eXBlIFske3ZhbHVlfV1gKTtcclxuICAgICAgcmV0dXJuIHZhbHVlO1xyXG4gICAgfVxyXG4gICAgaWYgKHR5cGVvZiBsYW5ndWFnZSAhPT0gJ3N0cmluZycpIHtcclxuICAgICAgY29uc29sZS5lcnJvcihgTGFuZ3VhZ2VQaXBlIGhhcyBiZWVuIGludm9rZWQgd2l0aCBhbiBpbnZhbGlkIHBhcmFtZXRlciBbJHtsYW5ndWFnZX1dYCk7XHJcbiAgICAgIHJldHVybiB2YWx1ZTtcclxuICAgIH1cclxuICAgIHJldHVybiAnYGBgJyArIGxhbmd1YWdlICsgJ1xcbicgKyAgdmFsdWUgKyAnXFxuYGBgJztcclxuICB9XHJcbn1cclxuIl19

@@ -15,2 +15,8 @@ import { Pipe, InjectionToken, Injectable, Inject, PLATFORM_ID, SecurityContext, Optional, EventEmitter, Component, ElementRef, Input, Output, NgZone, NgModule } from '@angular/core';

transform(value, language) {
if (value == null) {
value = '';
}
if (language == null) {
language = '';
}
if (typeof value !== 'string') {

@@ -17,0 +23,0 @@ console.error(`LanguagePipe has been invoked with an invalid value type [${value}]`);

{
"name": "ngx-markdown",
"version": "11.1.2",
"version": "11.1.3",
"description": "Angular library that uses marked to parse markdown to html combined with Prism.js for synthax highlights",

@@ -9,3 +9,3 @@ "homepage": "https://github.com/jfcere/ngx-markdown",

"name": "Jean-Francois Cere",
"email": "jfcere@sherweb.com"
"email": "jfcere@hotmail.com"
},

@@ -12,0 +12,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc