@contentstack/utils
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -362,2 +362,3 @@ 'use strict'; | ||
MarkType["SUPERSCRIPT"] = "superscript"; | ||
MarkType["BREAK"] = "break"; | ||
})(MarkType || (MarkType = {})); | ||
@@ -401,2 +402,5 @@ var MarkType$1 = MarkType; | ||
_a[NodeType$1.LINK] = function (node, next) { | ||
if (node.attrs.target) { | ||
return "<a href=\"".concat(node.attrs.href || node.attrs.url, "\" target=\"").concat(node.attrs.target, "\">").concat(next(node.children), "</a>"); | ||
} | ||
return "<a href=\"".concat(node.attrs.href || node.attrs.url, "\">").concat(next(node.children), "</a>"); | ||
@@ -468,2 +472,5 @@ }, | ||
_a['reference'] = function (node, next) { | ||
if (node.attrs.type === 'asset') { | ||
return "<img src=\"".concat(node.attrs['asset-link'], "\" />"); | ||
} | ||
return ""; | ||
@@ -495,2 +502,5 @@ }, | ||
}, | ||
_a[MarkType$1.BREAK] = function (text) { | ||
return "<br />".concat(text); | ||
}, | ||
_a); | ||
@@ -520,2 +530,5 @@ | ||
var text = node.text; | ||
if (node.break) { | ||
text = renderOption[MarkType$1.BREAK](text); | ||
} | ||
if (node.superscript) { | ||
@@ -522,0 +535,0 @@ text = renderOption[MarkType$1.SUPERSCRIPT](text); |
@@ -38,2 +38,5 @@ var __assign = (this && this.__assign) || function () { | ||
var text = node.text; | ||
if (node.break) { | ||
text = renderOption[MarkType.BREAK](text); | ||
} | ||
if (node.superscript) { | ||
@@ -40,0 +43,0 @@ text = renderOption[MarkType.SUPERSCRIPT](text); |
@@ -10,4 +10,5 @@ var MarkType; | ||
MarkType["SUPERSCRIPT"] = "superscript"; | ||
MarkType["BREAK"] = "break"; | ||
})(MarkType || (MarkType = {})); | ||
export default MarkType; | ||
//# sourceMappingURL=mark-type.js.map |
@@ -12,2 +12,5 @@ var _a; | ||
_a[NodeType.LINK] = function (node, next) { | ||
if (node.attrs.target) { | ||
return "<a href=\"".concat(node.attrs.href || node.attrs.url, "\" target=\"").concat(node.attrs.target, "\">").concat(next(node.children), "</a>"); | ||
} | ||
return "<a href=\"".concat(node.attrs.href || node.attrs.url, "\">").concat(next(node.children), "</a>"); | ||
@@ -79,2 +82,5 @@ }, | ||
_a['reference'] = function (node, next) { | ||
if (node.attrs.type === 'asset') { | ||
return "<img src=\"".concat(node.attrs['asset-link'], "\" />"); | ||
} | ||
return ""; | ||
@@ -106,3 +112,6 @@ }, | ||
}, | ||
_a[MarkType.BREAK] = function (text) { | ||
return "<br />".concat(text); | ||
}, | ||
_a); | ||
//# sourceMappingURL=default-node-options.js.map |
@@ -8,4 +8,5 @@ declare enum MarkType { | ||
SUBSCRIPT = "subscript", | ||
SUPERSCRIPT = "superscript" | ||
SUPERSCRIPT = "superscript", | ||
BREAK = "break" | ||
} | ||
export default MarkType; |
@@ -10,4 +10,5 @@ import Node from "./node"; | ||
subscript?: boolean; | ||
break?: boolean; | ||
text: string; | ||
constructor(text: string); | ||
} |
{ | ||
"name": "@contentstack/utils", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Contentstack utilities for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.es.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
161943
1679
0