@contentstack/utils
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -564,2 +564,9 @@ 'use strict'; | ||
function referenceToHTML(node, renderOption, renderEmbed) { | ||
if (node.attrs.type === 'entry' && node.attrs['display-type'] === 'link') { | ||
var entryText = node.children ? nodeChildrenToHTML(node.children, renderOption, renderEmbed) : ''; | ||
if (node.attrs.target) { | ||
return "<a".concat(node.attrs.style ? " style=\"".concat(node.attrs.style, "\"") : "").concat(node.attrs.class ? " class=\"".concat(node.attrs.class, "\"") : "").concat(node.attrs.id ? " id=\"".concat(node.attrs.id, "\"") : "", " href=\"").concat(node.attrs.href || node.attrs.url, "\" target=\"").concat(node.attrs.target, "\">").concat(entryText, "</a>"); | ||
} | ||
return "<a".concat(node.attrs.style ? " style=\"".concat(node.attrs.style, "\"") : "").concat(node.attrs.class ? " class=\"".concat(node.attrs.class, "\"") : "").concat(node.attrs.id ? " id=\"".concat(node.attrs.id, "\"") : "", " href=\"").concat(node.attrs.href || node.attrs.url, "\">").concat(entryText, "</a>"); | ||
} | ||
function sendToRenderOption(referenceNode) { | ||
@@ -566,0 +573,0 @@ return renderOption[referenceNode.type](referenceNode, undefined); |
@@ -68,2 +68,9 @@ var __assign = (this && this.__assign) || function () { | ||
export function referenceToHTML(node, renderOption, renderEmbed) { | ||
if (node.attrs.type === 'entry' && node.attrs['display-type'] === 'link') { | ||
var entryText = node.children ? nodeChildrenToHTML(node.children, renderOption, renderEmbed) : ''; | ||
if (node.attrs.target) { | ||
return "<a".concat(node.attrs.style ? " style=\"".concat(node.attrs.style, "\"") : "").concat(node.attrs.class ? " class=\"".concat(node.attrs.class, "\"") : "").concat(node.attrs.id ? " id=\"".concat(node.attrs.id, "\"") : "", " href=\"").concat(node.attrs.href || node.attrs.url, "\" target=\"").concat(node.attrs.target, "\">").concat(entryText, "</a>"); | ||
} | ||
return "<a".concat(node.attrs.style ? " style=\"".concat(node.attrs.style, "\"") : "").concat(node.attrs.class ? " class=\"".concat(node.attrs.class, "\"") : "").concat(node.attrs.id ? " id=\"".concat(node.attrs.id, "\"") : "", " href=\"").concat(node.attrs.href || node.attrs.url, "\">").concat(entryText, "</a>"); | ||
} | ||
function sendToRenderOption(referenceNode) { | ||
@@ -70,0 +77,0 @@ return renderOption[referenceNode.type](referenceNode, undefined); |
{ | ||
"name": "@contentstack/utils", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"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
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
213630
1918