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

@october/slate-md-serializer

Package Overview
Dependencies
Maintainers
8
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@october/slate-md-serializer - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

.idea/inspectionProfiles/Project_Default.xml

10

lib/renderer.js

@@ -34,3 +34,3 @@ "use strict";

function formatListItem(children) {
function formatSoftBreak(children) {
return children.replace(/\n/g, "%n");

@@ -109,14 +109,14 @@ }

case "ordered-list":
return "1. " + formatListItem(children) + "\n";
return "1. " + formatSoftBreak(children) + "\n";
case "todo-list":
var checked = obj.getIn(["data", "checked"]);
var box = checked ? "[x]" : "[ ]";
return box + " " + formatListItem(children) + "\n";
return box + " " + formatSoftBreak(children) + "\n";
default:
case "bulleted-list":
return "* " + formatListItem(children) + "\n";
return "* " + formatSoftBreak(children) + "\n";
}
}
case "heading1":
return "# " + children;
return "# " + formatSoftBreak(children);
case "heading2":

@@ -123,0 +123,0 @@ return "## " + children;

{
"name": "@october/slate-md-serializer",
"version": "1.0.12",
"version": "1.0.13",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/renderer.js",

@@ -21,3 +21,3 @@ import parser from "./parser";

function formatListItem(children) {
function formatSoftBreak(children) {
return children.replace(/\n/g, "%n");

@@ -96,14 +96,14 @@ }

case "ordered-list":
return `1. ${formatListItem(children)}\n`;
return `1. ${formatSoftBreak(children)}\n`;
case "todo-list":
let checked = obj.getIn(["data", "checked"]);
let box = checked ? "[x]" : "[ ]";
return `${box} ${formatListItem(children)}\n`;
return `${box} ${formatSoftBreak(children)}\n`;
default:
case "bulleted-list":
return `* ${formatListItem(children)}\n`;
return `* ${formatSoftBreak(children)}\n`;
}
}
case "heading1":
return `# ${children}`;
return `# ${formatSoftBreak(children)}`;
case "heading2":

@@ -110,0 +110,0 @@ return `## ${children}`;

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