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

codemirror-node

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codemirror-node - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

13

index.js

@@ -26,3 +26,9 @@ var CodeMirror = require("codemirror/addon/runmode/runmode.node.js");

function esc(str) {
return str.replace(/[<&]/g, function(ch) { return ch == "&" ? "&amp;" : "&lt;"; });
const map = {
'<': '&lt;',
'/': '&#47;',
'&': '&amp;',
'>': '&gt;',
};
return str.replace(/[<&\/>]/g, ch => map[ch]);
}

@@ -32,3 +38,6 @@

function flush() {
if (curStyle) out += "<span class=\"" + curStyle.replace(/(^|\s+)/g, "$1cm-") + "\">" + accum + "</span>";
if (curStyle) {
accum = esc(accum);
out += "<span class=\"" + curStyle.replace(/(^|\s+)/g, "$1cm-") + "\">" + accum + "</span>";
}
else out += accum;

@@ -35,0 +44,0 @@ }

2

package.json
{
"name": "codemirror-node",
"version": "0.0.3",
"version": "0.0.4",
"description": "Run codemirror on the server",

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

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