@fileviewer/react-highlight
Advanced tools
+1
-5
@@ -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 @@ }, { |
+1
-1
| { | ||
| "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", |
+1
-5
@@ -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 @@ |
+4
-4
@@ -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 @@ |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
18023
-2.72%305
-3.79%1
Infinity%