@october/slate-md-serializer
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -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}`; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
272466
21
1