Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-highlightjs

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-highlightjs - npm Package Compare versions

Comparing version 4.0.0-beta.3 to 4.0.0-beta.4

81

bundles/ngx-highlightjs.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('@angular/common'), require('rxjs')) :
typeof define === 'function' && define.amd ? define('ngx-highlightjs', ['exports', '@angular/core', 'rxjs/operators', '@angular/common', 'rxjs'], factory) :
(global = global || self, factory(global['ngx-highlightjs'] = {}, global.ng.core, global.rxjs.operators, global.ng.common, global.rxjs));
}(this, (function (exports, core, operators, common, rxjs) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-highlightjs', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
(global = global || self, factory(global['ngx-highlightjs'] = {}, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.common));
}(this, (function (exports, core, rxjs, operators, common) { 'use strict';

@@ -887,23 +887,3 @@ /*! *****************************************************************************

if (_this.lineNumbers && _this._options && _this._options.lineNumbers) {
rxjs.animationFrameScheduler.schedule((/**
* @return {?}
*/
function () {
// Add line numbers
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe();
// If code lines is only 1, the library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
/** @type {?} */
var obs = new MutationObserver((/**
* @return {?}
*/
function () {
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
_this._nativeElement.classList.add('hljs-line-numbers');
}
obs.disconnect();
obs = null;
}));
obs.observe(_this._nativeElement, { childList: true });
}));
_this.addLineNumbers();
}

@@ -916,2 +896,48 @@ // Forward highlight response to the highlighted output

* @private
* @return {?}
*/
Highlight.prototype.addLineNumbers = /**
* @private
* @return {?}
*/
function () {
var _this = this;
// Clean up line numbers observer
this.destroyLineNumbersObserver();
rxjs.animationFrameScheduler.schedule((/**
* @return {?}
*/
function () {
// Add line numbers
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe();
// If lines count is 1, the line numbers library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
_this._lineNumbersObs = new MutationObserver((/**
* @return {?}
*/
function () {
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
_this._nativeElement.classList.add('hljs-line-numbers');
}
_this.destroyLineNumbersObserver();
}));
_this._lineNumbersObs.observe(_this._nativeElement, { childList: true });
}));
};
/**
* @private
* @return {?}
*/
Highlight.prototype.destroyLineNumbersObserver = /**
* @private
* @return {?}
*/
function () {
if (this._lineNumbersObs) {
this._lineNumbersObs.disconnect();
this._lineNumbersObs = null;
}
};
/**
* @private
* @param {?} content

@@ -960,2 +986,7 @@ * @return {?}

Highlight.prototype._nativeElement;
/**
* @type {?}
* @private
*/
Highlight.prototype._lineNumbersObs;
/** @type {?} */

@@ -962,0 +993,0 @@ Highlight.prototype.code;

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@angular/common"),require("rxjs")):"function"==typeof define&&define.amd?define("ngx-highlightjs",["exports","@angular/core","rxjs/operators","@angular/common","rxjs"],t):t((e=e||self)["ngx-highlightjs"]={},e.ng.core,e.rxjs.operators,e.ng.common,e.rxjs)}(this,(function(e,t,r,n,i){"use strict";
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-highlightjs",["exports","@angular/core","rxjs","rxjs/operators","@angular/common"],t):t((e=e||self)["ngx-highlightjs"]={},e.ng.core,e.rxjs,e.rxjs.operators,e.ng.common)}(this,(function(e,t,r,n,i){"use strict";
/*! *****************************************************************************

@@ -15,3 +15,3 @@ Copyright (c) Microsoft Corporation. All rights reserved.

and limitations under the License.
***************************************************************************** */function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var a=new t.InjectionToken("HIGHLIGHT_OPTIONS"),u=function(){function e(e,t,o){var a=this;this._options=o,this._ready=new i.BehaviorSubject(null),this.ready=this._ready.asObservable().pipe(r.filter((function(e){return!!e})),r.take(1)),n.isPlatformBrowser(t)&&e.defaultView.hljs?this._ready.next(e.defaultView.hljs):this._loadLibrary().pipe(r.switchMap((function(t){return a._options&&a._options.lineNumbers?(e.defaultView.hljs=t,s(import("highlightjs-line-numbers.js")).pipe(r.tap((function(){return a._ready.next(t)})))):(a._ready.next(t),i.EMPTY)})),r.catchError((function(e){return console.error("Unable to load hljs library",e),i.EMPTY}))).subscribe()}return e.prototype._loadLibrary=function(){var e=this;return this._options&&this._options.languages&&Object.keys(this._options.languages).length?i.from(s(import("highlight.js/lib/highlight"))).pipe(r.switchMap((function(t){return e._loadLanguages(t)}))):i.from(s(import("highlight.js")))},e.prototype._loadLanguages=function(e){var t=Object.entries(this._options.languages).map((function(t){var n=o(t,2),i=n[0],a=n[1];return s(a()).pipe(r.tap((function(t){return e.registerLanguage(i,t)})))}));return i.zip.apply(void 0,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}(t)).pipe(r.map((function(){return e})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(n.DOCUMENT),t.ɵɵinject(t.PLATFORM_ID),t.ɵɵinject(a,8))},token:e,providedIn:"root"}),e}();var s=function(e){return i.from(e).pipe(r.filter((function(e){return!!e&&!!e.default})),r.map((function(e){return e.default})))},l=function(){function e(e,t){var r=this;this._loader=e,e.ready.pipe().subscribe((function(e){r._hljs=e,t&&t.config&&(e.configure(t.config),e.listLanguages().length<1&&console.error("[HighlightJS]: No languages were registered!"))}))}return Object.defineProperty(e.prototype,"hljs",{get:function(){return this._hljs},enumerable:!0,configurable:!0}),e.prototype.highlight=function(e,t,n,i){return this._loader.ready.pipe(r.map((function(r){return r.highlight(e,t,n,i)})))},e.prototype.highlightAuto=function(e,t){return this._loader.ready.pipe(r.map((function(r){return r.highlightAuto(e,t)})))},e.prototype.fixMarkup=function(e){return this._loader.ready.pipe(r.map((function(t){return t.fixMarkup(e)})))},e.prototype.highlightBlock=function(e){return this._loader.ready.pipe(r.map((function(t){return t.highlightBlock(e)})))},e.prototype.configure=function(e){return this._loader.ready.pipe(r.map((function(t){return t.configure(e)})))},e.prototype.initHighlighting=function(){return this._loader.ready.pipe(r.map((function(e){return e.initHighlighting()})))},e.prototype.registerLanguage=function(e,t){return this._loader.ready.pipe(r.tap((function(r){return r.registerLanguage(e,t)})))},e.prototype.listLanguages=function(){return this._loader.ready.pipe(r.map((function(e){return e.listLanguages()})))},e.prototype.getLanguage=function(e){return this._loader.ready.pipe(r.map((function(t){return t.getLanguage(e)})))},e.prototype.lineNumbersBlock=function(e){return this._loader.ready.pipe(r.filter((function(e){return!!e.lineNumbersBlock})),r.tap((function(t){return t.lineNumbersBlock(e)})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:u},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(u),t.ɵɵinject(a,8))},token:e,providedIn:"root"}),e}();var p=function(){function e(e,r,n){this._hljs=r,this._options=n,this.highlighted=new t.EventEmitter,this._nativeElement=e.nativeElement}return e.prototype.ngOnChanges=function(e){e.code&&e.code.currentValue&&e.code.currentValue!==e.code.previousValue&&this.highlightElement(this.code,this.languages)},e.prototype.highlightElement=function(e,t){var r=this;this.setCode(e),this._hljs.highlightAuto(e,t).subscribe((function(e){r.setCode(e.value),r.lineNumbers&&r._options&&r._options.lineNumbers&&i.animationFrameScheduler.schedule((function(){r._hljs.lineNumbersBlock(r._nativeElement).subscribe();var e=new MutationObserver((function(){"TABLE"===r._nativeElement.firstElementChild.tagName.toUpperCase()&&r._nativeElement.classList.add("hljs-line-numbers"),e.disconnect(),e=null}));e.observe(r._nativeElement,{childList:!0})})),r.highlighted.emit(e)}))},e.prototype.setCode=function(e){var t=this;i.animationFrameScheduler.schedule((function(){return t._nativeElement.innerHTML=e}))},e.decorators=[{type:t.Directive,args:[{host:{"[class.hljs]":"true"},selector:"[highlight]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:l},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[a]}]}]},e.propDecorators={code:[{type:t.Input,args:["highlight"]}],languages:[{type:t.Input}],lineNumbers:[{type:t.Input}],highlighted:[{type:t.Output}]},e}();var c=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[p],exports:[p]}]}],e}();e.HIGHLIGHT_OPTIONS=a,e.Highlight=p,e.HighlightJS=l,e.HighlightLoader=u,e.HighlightModule=c,Object.defineProperty(e,"__esModule",{value:!0})}));
***************************************************************************** */function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}var u=new t.InjectionToken("HIGHLIGHT_OPTIONS"),a=function(){function e(e,t,o){var u=this;this._options=o,this._ready=new r.BehaviorSubject(null),this.ready=this._ready.asObservable().pipe(n.filter((function(e){return!!e})),n.take(1)),i.isPlatformBrowser(t)&&e.defaultView.hljs?this._ready.next(e.defaultView.hljs):this._loadLibrary().pipe(n.switchMap((function(t){return u._options&&u._options.lineNumbers?(e.defaultView.hljs=t,s(import("highlightjs-line-numbers.js")).pipe(n.tap((function(){return u._ready.next(t)})))):(u._ready.next(t),r.EMPTY)})),n.catchError((function(e){return console.error("Unable to load hljs library",e),r.EMPTY}))).subscribe()}return e.prototype._loadLibrary=function(){var e=this;return this._options&&this._options.languages&&Object.keys(this._options.languages).length?r.from(s(import("highlight.js/lib/highlight"))).pipe(n.switchMap((function(t){return e._loadLanguages(t)}))):r.from(s(import("highlight.js")))},e.prototype._loadLanguages=function(e){var t=Object.entries(this._options.languages).map((function(t){var r=o(t,2),i=r[0],u=r[1];return s(u()).pipe(n.tap((function(t){return e.registerLanguage(i,t)})))}));return r.zip.apply(void 0,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}(t)).pipe(n.map((function(){return e})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[i.DOCUMENT]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[u]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.DOCUMENT),t.ɵɵinject(t.PLATFORM_ID),t.ɵɵinject(u,8))},token:e,providedIn:"root"}),e}();var s=function(e){return r.from(e).pipe(n.filter((function(e){return!!e&&!!e.default})),n.map((function(e){return e.default})))},l=function(){function e(e,t){var r=this;this._loader=e,e.ready.pipe().subscribe((function(e){r._hljs=e,t&&t.config&&(e.configure(t.config),e.listLanguages().length<1&&console.error("[HighlightJS]: No languages were registered!"))}))}return Object.defineProperty(e.prototype,"hljs",{get:function(){return this._hljs},enumerable:!0,configurable:!0}),e.prototype.highlight=function(e,t,r,i){return this._loader.ready.pipe(n.map((function(n){return n.highlight(e,t,r,i)})))},e.prototype.highlightAuto=function(e,t){return this._loader.ready.pipe(n.map((function(r){return r.highlightAuto(e,t)})))},e.prototype.fixMarkup=function(e){return this._loader.ready.pipe(n.map((function(t){return t.fixMarkup(e)})))},e.prototype.highlightBlock=function(e){return this._loader.ready.pipe(n.map((function(t){return t.highlightBlock(e)})))},e.prototype.configure=function(e){return this._loader.ready.pipe(n.map((function(t){return t.configure(e)})))},e.prototype.initHighlighting=function(){return this._loader.ready.pipe(n.map((function(e){return e.initHighlighting()})))},e.prototype.registerLanguage=function(e,t){return this._loader.ready.pipe(n.tap((function(r){return r.registerLanguage(e,t)})))},e.prototype.listLanguages=function(){return this._loader.ready.pipe(n.map((function(e){return e.listLanguages()})))},e.prototype.getLanguage=function(e){return this._loader.ready.pipe(n.map((function(t){return t.getLanguage(e)})))},e.prototype.lineNumbersBlock=function(e){return this._loader.ready.pipe(n.filter((function(e){return!!e.lineNumbersBlock})),n.tap((function(t){return t.lineNumbersBlock(e)})))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:a},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[u]}]}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(a),t.ɵɵinject(u,8))},token:e,providedIn:"root"}),e}();var p=function(){function e(e,r,n){this._hljs=r,this._options=n,this.highlighted=new t.EventEmitter,this._nativeElement=e.nativeElement}return e.prototype.ngOnChanges=function(e){e.code&&e.code.currentValue&&e.code.currentValue!==e.code.previousValue&&this.highlightElement(this.code,this.languages)},e.prototype.highlightElement=function(e,t){var r=this;this.setCode(e),this._hljs.highlightAuto(e,t).subscribe((function(e){r.setCode(e.value),r.lineNumbers&&r._options&&r._options.lineNumbers&&r.addLineNumbers(),r.highlighted.emit(e)}))},e.prototype.addLineNumbers=function(){var e=this;this.destroyLineNumbersObserver(),r.animationFrameScheduler.schedule((function(){e._hljs.lineNumbersBlock(e._nativeElement).subscribe(),e._lineNumbersObs=new MutationObserver((function(){"TABLE"===e._nativeElement.firstElementChild.tagName.toUpperCase()&&e._nativeElement.classList.add("hljs-line-numbers"),e.destroyLineNumbersObserver()})),e._lineNumbersObs.observe(e._nativeElement,{childList:!0})}))},e.prototype.destroyLineNumbersObserver=function(){this._lineNumbersObs&&(this._lineNumbersObs.disconnect(),this._lineNumbersObs=null)},e.prototype.setCode=function(e){var t=this;r.animationFrameScheduler.schedule((function(){return t._nativeElement.innerHTML=e}))},e.decorators=[{type:t.Directive,args:[{host:{"[class.hljs]":"true"},selector:"[highlight]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:l},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[u]}]}]},e.propDecorators={code:[{type:t.Input,args:["highlight"]}],languages:[{type:t.Input}],lineNumbers:[{type:t.Input}],highlighted:[{type:t.Output}]},e}();var c=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[p],exports:[p]}]}],e}();e.HIGHLIGHT_OPTIONS=u,e.Highlight=p,e.HighlightJS=l,e.HighlightLoader=a,e.HighlightModule=c,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-highlightjs.umd.min.js.map

@@ -6,5 +6,5 @@ /**

import { Directive, Input, Output, Inject, Optional, EventEmitter, ElementRef } from '@angular/core';
import { animationFrameScheduler } from 'rxjs';
import { HighlightJS } from './highlight.service';
import { HIGHLIGHT_OPTIONS } from './highlight.model';
import { animationFrameScheduler } from 'rxjs';
export class Highlight {

@@ -53,23 +53,3 @@ /**

if (this.lineNumbers && this._options && this._options.lineNumbers) {
animationFrameScheduler.schedule((/**
* @return {?}
*/
() => {
// Add line numbers
this._hljs.lineNumbersBlock(this._nativeElement).subscribe();
// If code lines is only 1, the library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
/** @type {?} */
let obs = new MutationObserver((/**
* @return {?}
*/
() => {
if (this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
this._nativeElement.classList.add('hljs-line-numbers');
}
obs.disconnect();
obs = null;
}));
obs.observe(this._nativeElement, { childList: true });
}));
this.addLineNumbers();
}

@@ -82,2 +62,39 @@ // Forward highlight response to the highlighted output

* @private
* @return {?}
*/
addLineNumbers() {
// Clean up line numbers observer
this.destroyLineNumbersObserver();
animationFrameScheduler.schedule((/**
* @return {?}
*/
() => {
// Add line numbers
this._hljs.lineNumbersBlock(this._nativeElement).subscribe();
// If lines count is 1, the line numbers library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
this._lineNumbersObs = new MutationObserver((/**
* @return {?}
*/
() => {
if (this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
this._nativeElement.classList.add('hljs-line-numbers');
}
this.destroyLineNumbersObserver();
}));
this._lineNumbersObs.observe(this._nativeElement, { childList: true });
}));
}
/**
* @private
* @return {?}
*/
destroyLineNumbersObserver() {
if (this._lineNumbersObs) {
this._lineNumbersObs.disconnect();
this._lineNumbersObs = null;
}
}
/**
* @private
* @param {?} content

@@ -119,2 +136,7 @@ * @return {?}

Highlight.prototype._nativeElement;
/**
* @type {?}
* @private
*/
Highlight.prototype._lineNumbersObs;
/** @type {?} */

@@ -139,2 +161,2 @@ Highlight.prototype.code;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWhpZ2hsaWdodGpzLyIsInNvdXJjZXMiOlsibGliL2hpZ2hsaWdodC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxLQUFLLEVBQ0wsTU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kZWQgdG8gdGhlIGNvZGUgZWxlbWVudFxyXG4gICAgICAgICAgbGV0IG9icyA9IG5ldyBNdXRhdGlvbk9ic2VydmVyKCgpID0+IHtcclxuICAgICAgICAgICAgaWYgKHRoaXMuX25hdGl2ZUVsZW1lbnQuZmlyc3RFbGVtZW50Q2hpbGQudGFnTmFtZS50b1VwcGVyQ2FzZSgpID09PSAnVEFCTEUnKSB7XHJcbiAgICAgICAgICAgICAgdGhpcy5fbmF0aXZlRWxlbWVudC5jbGFzc0xpc3QuYWRkKCdobGpzLWxpbmUtbnVtYmVycycpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG9icy5kaXNjb25uZWN0KCk7XHJcbiAgICAgICAgICAgIG9icyA9IG51bGw7XHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICAgIG9icy5vYnNlcnZlKHRoaXMuX25hdGl2ZUVsZW1lbnQsIHsgY2hpbGRMaXN0OiB0cnVlIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICB9XHJcbiAgICAgIC8vIEZvcndhcmQgaGlnaGxpZ2h0IHJlc3BvbnNlIHRvIHRoZSBoaWdobGlnaHRlZCBvdXRwdXRcclxuICAgICAgdGhpcy5oaWdobGlnaHRlZC5lbWl0KHJlcyk7XHJcbiAgICB9KTtcclxuICB9XHJcblxyXG4gIHByaXZhdGUgc2V0Q29kZShjb250ZW50OiBzdHJpbmcpIHtcclxuICAgIGFuaW1hdGlvbkZyYW1lU2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IHRoaXMuX25hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gY29udGVudCk7XHJcbiAgfVxyXG59XHJcblxyXG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWhpZ2hsaWdodGpzLyIsInNvdXJjZXMiOlsibGliL2hpZ2hsaWdodC50cyJdLCJ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b25PYnNlcnZlcigoKSA9PiB7XHJcbiAgICAgICAgaWYgKHRoaXMuX25hdGl2ZUVsZW1lbnQuZmlyc3RFbGVtZW50Q2hpbGQudGFnTmFtZS50b1VwcGVyQ2FzZSgpID09PSAnVEFCTEUnKSB7XHJcbiAgICAgICAgICB0aGlzLl9uYXRpdmVFbGVtZW50LmNsYXNzTGlzdC5hZGQoJ2hsanMtbGluZS1udW1iZXJzJyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuZGVzdHJveUxpbmVOdW1iZXJzT2JzZXJ2ZXIoKTtcclxuICAgICAgfSk7XHJcbiAgICAgIHRoaXMuX2xpbmVOdW1iZXJzT2JzLm9ic2VydmUodGhpcy5fbmF0aXZlRWxlbWVudCwgeyBjaGlsZExpc3Q6IHRydWUgfSk7XHJcbiAgICB9KTtcclxuICB9XHJcblxyXG4gIHByaXZhdGUgZGVzdHJveUxpbmVOdW1iZXJzT2JzZXJ2ZXIoKSB7XHJcbiAgICBpZiAodGhpcy5fbGluZU51bWJlcnNPYnMpIHtcclxuICAgICAgdGhpcy5fbGluZU51bWJlcnNPYnMuZGlzY29ubmVjdCgpO1xyXG4gICAgICB0aGlzLl9saW5lTnVtYmVyc09icyA9IG51bGw7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIHNldENvZGUoY29udGVudDogc3RyaW5nKSB7XHJcbiAgICBhbmltYXRpb25GcmFtZVNjaGVkdWxlci5zY2hlZHVsZSgoKSA9PiB0aGlzLl9uYXRpdmVFbGVtZW50LmlubmVySFRNTCA9IGNvbnRlbnQpO1xyXG4gIH1cclxufVxyXG5cclxuIl19

@@ -6,5 +6,5 @@ /**

import { Directive, Input, Output, Inject, Optional, EventEmitter, ElementRef } from '@angular/core';
import { animationFrameScheduler } from 'rxjs';
import { HighlightJS } from './highlight.service';
import { HIGHLIGHT_OPTIONS } from './highlight.model';
import { animationFrameScheduler } from 'rxjs';
var Highlight = /** @class */ (function () {

@@ -66,23 +66,3 @@ function Highlight(el, _hljs, _options) {

if (_this.lineNumbers && _this._options && _this._options.lineNumbers) {
animationFrameScheduler.schedule((/**
* @return {?}
*/
function () {
// Add line numbers
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe();
// If code lines is only 1, the library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
/** @type {?} */
var obs = new MutationObserver((/**
* @return {?}
*/
function () {
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
_this._nativeElement.classList.add('hljs-line-numbers');
}
obs.disconnect();
obs = null;
}));
obs.observe(_this._nativeElement, { childList: true });
}));
_this.addLineNumbers();
}

@@ -95,2 +75,48 @@ // Forward highlight response to the highlighted output

* @private
* @return {?}
*/
Highlight.prototype.addLineNumbers = /**
* @private
* @return {?}
*/
function () {
var _this = this;
// Clean up line numbers observer
this.destroyLineNumbersObserver();
animationFrameScheduler.schedule((/**
* @return {?}
*/
function () {
// Add line numbers
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe();
// If lines count is 1, the line numbers library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
_this._lineNumbersObs = new MutationObserver((/**
* @return {?}
*/
function () {
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
_this._nativeElement.classList.add('hljs-line-numbers');
}
_this.destroyLineNumbersObserver();
}));
_this._lineNumbersObs.observe(_this._nativeElement, { childList: true });
}));
};
/**
* @private
* @return {?}
*/
Highlight.prototype.destroyLineNumbersObserver = /**
* @private
* @return {?}
*/
function () {
if (this._lineNumbersObs) {
this._lineNumbersObs.disconnect();
this._lineNumbersObs = null;
}
};
/**
* @private
* @param {?} content

@@ -140,2 +166,7 @@ * @return {?}

Highlight.prototype._nativeElement;
/**
* @type {?}
* @private
*/
Highlight.prototype._lineNumbersObs;
/** @type {?} */

@@ -160,2 +191,2 @@ Highlight.prototype.code;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJ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jb25uZWN0KCk7XHJcbiAgICAgIHRoaXMuX2xpbmVOdW1iZXJzT2JzID0gbnVsbDtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIHByaXZhdGUgc2V0Q29kZShjb250ZW50OiBzdHJpbmcpIHtcclxuICAgIGFuaW1hdGlvbkZyYW1lU2NoZWR1bGVyLnNjaGVkdWxlKCgpID0+IHRoaXMuX25hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MID0gY29udGVudCk7XHJcbiAgfVxyXG59XHJcblxyXG4iXX0=
import { InjectionToken, Injectable, Inject, PLATFORM_ID, Optional, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Directive, ElementRef, Input, Output, NgModule } from '@angular/core';
import { BehaviorSubject, from, EMPTY, zip, animationFrameScheduler } from 'rxjs';
import { filter, take, switchMap, map, tap, catchError } from 'rxjs/operators';
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
import { BehaviorSubject, from, EMPTY, zip, animationFrameScheduler } from 'rxjs';

@@ -542,23 +542,3 @@ /**

if (this.lineNumbers && this._options && this._options.lineNumbers) {
animationFrameScheduler.schedule((/**
* @return {?}
*/
() => {
// Add line numbers
this._hljs.lineNumbersBlock(this._nativeElement).subscribe();
// If code lines is only 1, the library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
/** @type {?} */
let obs = new MutationObserver((/**
* @return {?}
*/
() => {
if (this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
this._nativeElement.classList.add('hljs-line-numbers');
}
obs.disconnect();
obs = null;
}));
obs.observe(this._nativeElement, { childList: true });
}));
this.addLineNumbers();
}

@@ -571,2 +551,39 @@ // Forward highlight response to the highlighted output

* @private
* @return {?}
*/
addLineNumbers() {
// Clean up line numbers observer
this.destroyLineNumbersObserver();
animationFrameScheduler.schedule((/**
* @return {?}
*/
() => {
// Add line numbers
this._hljs.lineNumbersBlock(this._nativeElement).subscribe();
// If lines count is 1, the line numbers library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
this._lineNumbersObs = new MutationObserver((/**
* @return {?}
*/
() => {
if (this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
this._nativeElement.classList.add('hljs-line-numbers');
}
this.destroyLineNumbersObserver();
}));
this._lineNumbersObs.observe(this._nativeElement, { childList: true });
}));
}
/**
* @private
* @return {?}
*/
destroyLineNumbersObserver() {
if (this._lineNumbersObs) {
this._lineNumbersObs.disconnect();
this._lineNumbersObs = null;
}
}
/**
* @private
* @param {?} content

@@ -608,2 +625,7 @@ * @return {?}

Highlight.prototype._nativeElement;
/**
* @type {?}
* @private
*/
Highlight.prototype._lineNumbersObs;
/** @type {?} */

@@ -610,0 +632,0 @@ Highlight.prototype.code;

import { InjectionToken, Injectable, Inject, PLATFORM_ID, Optional, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Directive, ElementRef, Input, Output, NgModule } from '@angular/core';
import { BehaviorSubject, from, EMPTY, zip, animationFrameScheduler } from 'rxjs';
import { filter, take, switchMap, map, tap, catchError } from 'rxjs/operators';
import { __read, __spread } from 'tslib';
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
import { BehaviorSubject, from, EMPTY, zip, animationFrameScheduler } from 'rxjs';

@@ -690,23 +690,3 @@ /**

if (_this.lineNumbers && _this._options && _this._options.lineNumbers) {
animationFrameScheduler.schedule((/**
* @return {?}
*/
function () {
// Add line numbers
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe();
// If code lines is only 1, the library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
/** @type {?} */
var obs = new MutationObserver((/**
* @return {?}
*/
function () {
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
_this._nativeElement.classList.add('hljs-line-numbers');
}
obs.disconnect();
obs = null;
}));
obs.observe(_this._nativeElement, { childList: true });
}));
_this.addLineNumbers();
}

@@ -719,2 +699,48 @@ // Forward highlight response to the highlighted output

* @private
* @return {?}
*/
Highlight.prototype.addLineNumbers = /**
* @private
* @return {?}
*/
function () {
var _this = this;
// Clean up line numbers observer
this.destroyLineNumbersObserver();
animationFrameScheduler.schedule((/**
* @return {?}
*/
function () {
// Add line numbers
_this._hljs.lineNumbersBlock(_this._nativeElement).subscribe();
// If lines count is 1, the line numbers library will not add numbers
// Observe changes to add 'hljs-line-numbers' class only when line numbers is added to the code element
_this._lineNumbersObs = new MutationObserver((/**
* @return {?}
*/
function () {
if (_this._nativeElement.firstElementChild.tagName.toUpperCase() === 'TABLE') {
_this._nativeElement.classList.add('hljs-line-numbers');
}
_this.destroyLineNumbersObserver();
}));
_this._lineNumbersObs.observe(_this._nativeElement, { childList: true });
}));
};
/**
* @private
* @return {?}
*/
Highlight.prototype.destroyLineNumbersObserver = /**
* @private
* @return {?}
*/
function () {
if (this._lineNumbersObs) {
this._lineNumbersObs.disconnect();
this._lineNumbersObs = null;
}
};
/**
* @private
* @param {?} content

@@ -763,2 +789,7 @@ * @return {?}

Highlight.prototype._nativeElement;
/**
* @type {?}
* @private
*/
Highlight.prototype._lineNumbersObs;
/** @type {?} */

@@ -765,0 +796,0 @@ Highlight.prototype.code;

@@ -8,2 +8,3 @@ import { OnChanges, SimpleChanges, EventEmitter, ElementRef } from '@angular/core';

private readonly _nativeElement;
private _lineNumbersObs;
code: string;

@@ -22,3 +23,5 @@ languages: string[];

highlightElement(code: string, languages?: string[]): void;
private addLineNumbers;
private destroyLineNumbersObserver;
private setCode;
}

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

{"__symbolic":"module","version":4,"metadata":{"Highlight":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"host":{"[class.hljs]":"true","$quoted$":["[class.hljs]"]},"selector":"[highlight]"}]}],"members":{"code":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3},"arguments":["highlight"]}]}],"languages":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"lineNumbers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"highlighted":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":37,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":41,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":41,"character":27},"arguments":[{"__symbolic":"reference","name":"HIGHLIGHT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":39,"character":18},{"__symbolic":"reference","name":"HighlightJS"},{"__symbolic":"reference","name":"HighlightOptions"}]}],"ngOnChanges":[{"__symbolic":"method"}],"highlightElement":[{"__symbolic":"method"}],"setCode":[{"__symbolic":"method"}]}},"HighlightLibrary":{"__symbolic":"interface"},"HighlightConfig":{"__symbolic":"interface"},"HighlightResult":{"__symbolic":"interface"},"HighlightOptions":{"__symbolic":"interface"},"HIGHLIGHT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":102,"character":37},"arguments":["HIGHLIGHT_OPTIONS"]},"HighlightModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"Highlight"}],"exports":[{"__symbolic":"reference","name":"Highlight"}]}]}],"members":{}},"HighlightJS":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":49}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":61},"arguments":[{"__symbolic":"reference","name":"HIGHLIGHT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"HighlightLoader"},{"__symbolic":"reference","name":"HighlightOptions"}]}],"highlight":[{"__symbolic":"method"}],"highlightAuto":[{"__symbolic":"method"}],"fixMarkup":[{"__symbolic":"method"}],"highlightBlock":[{"__symbolic":"method"}],"configure":[{"__symbolic":"method"}],"initHighlighting":[{"__symbolic":"method"}],"registerLanguage":[{"__symbolic":"method"}],"listLanguages":[{"__symbolic":"method"}],"getLanguage":[{"__symbolic":"method"}],"lineNumbersBlock":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"HighlightLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":18,"character":22}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":19,"character":22}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":27},"arguments":[{"__symbolic":"reference","name":"HIGHLIGHT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Expression form not supported","line":19,"character":47,"module":"./lib/highlight.loader"},{"__symbolic":"reference","name":"HighlightOptions"}]}],"_loadLibrary":[{"__symbolic":"method"}],"_loadLanguages":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}}},"origins":{"Highlight":"./lib/highlight","HighlightLibrary":"./lib/highlight.model","HighlightConfig":"./lib/highlight.model","HighlightResult":"./lib/highlight.model","HighlightOptions":"./lib/highlight.model","HIGHLIGHT_OPTIONS":"./lib/highlight.model","HighlightModule":"./lib/highlight.module","HighlightJS":"./lib/highlight.service","HighlightLoader":"./lib/highlight.loader"},"importAs":"ngx-highlightjs"}
{"__symbolic":"module","version":4,"metadata":{"Highlight":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":15,"character":1},"arguments":[{"host":{"[class.hljs]":"true","$quoted$":["[class.hljs]"]},"selector":"[highlight]"}]}],"members":{"code":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3},"arguments":["highlight"]}]}],"languages":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"lineNumbers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"highlighted":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":40,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":44,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":44,"character":27},"arguments":[{"__symbolic":"reference","name":"HIGHLIGHT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":42,"character":18},{"__symbolic":"reference","name":"HighlightJS"},{"__symbolic":"reference","name":"HighlightOptions"}]}],"ngOnChanges":[{"__symbolic":"method"}],"highlightElement":[{"__symbolic":"method"}],"addLineNumbers":[{"__symbolic":"method"}],"destroyLineNumbersObserver":[{"__symbolic":"method"}],"setCode":[{"__symbolic":"method"}]}},"HighlightLibrary":{"__symbolic":"interface"},"HighlightConfig":{"__symbolic":"interface"},"HighlightResult":{"__symbolic":"interface"},"HighlightOptions":{"__symbolic":"interface"},"HIGHLIGHT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":102,"character":37},"arguments":["HIGHLIGHT_OPTIONS"]},"HighlightModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"Highlight"}],"exports":[{"__symbolic":"reference","name":"Highlight"}]}]}],"members":{}},"HighlightJS":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":49}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":61},"arguments":[{"__symbolic":"reference","name":"HIGHLIGHT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"HighlightLoader"},{"__symbolic":"reference","name":"HighlightOptions"}]}],"highlight":[{"__symbolic":"method"}],"highlightAuto":[{"__symbolic":"method"}],"fixMarkup":[{"__symbolic":"method"}],"highlightBlock":[{"__symbolic":"method"}],"configure":[{"__symbolic":"method"}],"initHighlighting":[{"__symbolic":"method"}],"registerLanguage":[{"__symbolic":"method"}],"listLanguages":[{"__symbolic":"method"}],"getLanguage":[{"__symbolic":"method"}],"lineNumbersBlock":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"HighlightLoader":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":18,"character":22}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":19,"character":22}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":20,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":27},"arguments":[{"__symbolic":"reference","name":"HIGHLIGHT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"error","message":"Expression form not supported","line":19,"character":47,"module":"./lib/highlight.loader"},{"__symbolic":"reference","name":"HighlightOptions"}]}],"_loadLibrary":[{"__symbolic":"method"}],"_loadLanguages":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}}},"origins":{"Highlight":"./lib/highlight","HighlightLibrary":"./lib/highlight.model","HighlightConfig":"./lib/highlight.model","HighlightResult":"./lib/highlight.model","HighlightOptions":"./lib/highlight.model","HIGHLIGHT_OPTIONS":"./lib/highlight.model","HighlightModule":"./lib/highlight.module","HighlightJS":"./lib/highlight.service","HighlightLoader":"./lib/highlight.loader"},"importAs":"ngx-highlightjs"}
{
"name": "ngx-highlightjs",
"version": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"description": "Instant code highlighting, auto-detect language, super easy to use.",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/murhafsousli/ngx-highlightjs",

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

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