Sign In

@fileviewer/react-highlight

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fileviewer/react-highlight - npm Package Compare versions

Comparing version
0.13.0
to
0.14.0
+1
-5
lib/index.js

@@ -50,7 +50,3 @@ 'use strict';

value: function highlightCode() {
var nodes = this.el.querySelectorAll('pre');
for (var i = 0; i < nodes.length; i++) {
_highlight2.default.highlightBlock(nodes[i]);
}
_highlight2.default.highlightBlock(this.el);
}

@@ -57,0 +53,0 @@ }, {

+1
-4

@@ -61,3 +61,2 @@ 'use strict';

var nodes = this.el.querySelectorAll('pre code');

@@ -72,5 +71,3 @@ if (languages.length === 0 && className) {

for (var i = 0; i < nodes.length; i++) {
_highlight2.default.highlightBlock(nodes[i]);
}
_highlight2.default.highlightBlock(this.el);
}

@@ -77,0 +74,0 @@ }, {

{
"name": "@fileviewer/react-highlight",
"version": "0.13.0",
"version": "0.14.0",
"description": "React component for syntax highlighting",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -18,7 +18,3 @@ import hljs from 'highlight.js';

highlightCode() {
const nodes = this.el.querySelectorAll('pre');
for (let i = 0; i < nodes.length; i++) {
hljs.highlightBlock(nodes[i])
}
hljs.highlightBlock(this.el);
}

@@ -25,0 +21,0 @@

@@ -15,4 +15,4 @@ import hljs from'highlight.js/lib/highlight';

const {className, languages} = this.props;
const nodes = this.el.querySelectorAll('pre code');
if ((languages.length === 0) && className) {

@@ -26,5 +26,5 @@ languages.push(className);

for (let i = 0; i < nodes.length; i++) {
hljs.highlightBlock(nodes[i])
}
hljs.highlightBlock(this.el)
}

@@ -31,0 +31,0 @@