@contentful/rich-text-plain-text-renderer
Advanced tools
Comparing version 8.0.2 to 8.0.3
@@ -75,3 +75,9 @@ "use strict"; | ||
var nodeIsInBlockSequence = nextNode && !isText(nextNode); | ||
var divisor = nodeIsInBlockSequence ? blockDivisor : ''; | ||
var hasLeadingOrTrailingDivisor = [ | ||
nodeTextValue[0], | ||
nodeTextValue[nodeTextValue.length] | ||
].includes(blockDivisor); | ||
var shouldAddDivisor = (nodeIsInBlockSequence && | ||
!hasLeadingOrTrailingDivisor); | ||
var divisor = shouldAddDivisor ? blockDivisor : ''; | ||
return textValue + nodeTextValue + divisor; | ||
@@ -78,0 +84,0 @@ } |
@@ -77,3 +77,9 @@ 'use strict'; | ||
var nodeIsInBlockSequence = nextNode && !isText(nextNode); | ||
var divisor = nodeIsInBlockSequence ? blockDivisor : ''; | ||
var hasLeadingOrTrailingDivisor = [ | ||
nodeTextValue[0], | ||
nodeTextValue[nodeTextValue.length] | ||
].includes(blockDivisor); | ||
var shouldAddDivisor = (nodeIsInBlockSequence && | ||
!hasLeadingOrTrailingDivisor); | ||
var divisor = shouldAddDivisor ? blockDivisor : ''; | ||
return textValue + nodeTextValue + divisor; | ||
@@ -80,0 +86,0 @@ } |
{ | ||
"name": "@contentful/rich-text-plain-text-renderer", | ||
"version": "8.0.2", | ||
"version": "8.0.3", | ||
"main": "dist/rich-text-plain-text-renderer.es5.js", | ||
@@ -26,6 +26,5 @@ "typings": "dist/types/rich-text-plain-text-renderer.d.ts", | ||
"dependencies": { | ||
"@contentful/rich-text-types": "^8.0.2" | ||
"@contentful/rich-text-types": "^8.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^22.0.0", | ||
"jest": "^23.6.0", | ||
@@ -40,6 +39,5 @@ "rimraf": "^2.6.2", | ||
"ts-jest": "^23.10.4", | ||
"ts-node": "^7.0.1", | ||
"typescript": "^2.6.2" | ||
"typescript": "^2.9.2" | ||
}, | ||
"gitHead": "e394bb24b5119fe9adbc2ff8ab91b6aab732630e" | ||
"gitHead": "9945921982016ab62b523acfb8aae2509219aade" | ||
} |
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
22556
10
314
10