🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@contentful/rich-text-plain-text-renderer

Package Overview
Dependencies
Maintainers
105
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/rich-text-plain-text-renderer - npm Package Compare versions

Comparing version

to
15.3.5

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [15.3.5](https://github.com/contentful/rich-text/compare/v15.3.4...v15.3.5) (2021-09-13)
**Note:** Version bump only for package @contentful/rich-text-plain-text-renderer
## [15.3.3](https://github.com/contentful/rich-text/compare/v15.3.2...v15.3.3) (2021-09-07)

@@ -8,0 +16,0 @@

59

dist/rich-text-plain-text-renderer.es5.js

@@ -202,3 +202,3 @@ 'use strict';

})('versions', []).push({
version: '3.17.2',
version: '3.17.3',
mode: 'global',

@@ -916,23 +916,2 @@ copyright: '© 2021 Denis Pushkarev (zloirock.ru)'

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}
var _a;

@@ -960,2 +939,20 @@ /**

/**
* Array of all allowed block types inside list items
*/
var LIST_ITEM_BLOCKS = [
BLOCKS$1.PARAGRAPH,
BLOCKS$1.HEADING_1,
BLOCKS$1.HEADING_2,
BLOCKS$1.HEADING_3,
BLOCKS$1.HEADING_4,
BLOCKS$1.HEADING_5,
BLOCKS$1.HEADING_6,
BLOCKS$1.OL_LIST,
BLOCKS$1.UL_LIST,
BLOCKS$1.HR,
BLOCKS$1.QUOTE,
BLOCKS$1.EMBEDDED_ENTRY,
BLOCKS$1.EMBEDDED_ASSET,
];
/**
* Array of all void block types

@@ -970,3 +967,3 @@ */

_a[BLOCKS$1.UL_LIST] = [BLOCKS$1.LIST_ITEM],
_a[BLOCKS$1.LIST_ITEM] = __spreadArray([], TOP_LEVEL_BLOCKS),
_a[BLOCKS$1.LIST_ITEM] = LIST_ITEM_BLOCKS,
_a[BLOCKS$1.QUOTE] = [BLOCKS$1.PARAGRAPH],

@@ -1032,2 +1029,3 @@ _a[BLOCKS$1.TABLE] = [BLOCKS$1.TABLE_ROW],

exports.INLINES = INLINES$1;
exports.LIST_ITEM_BLOCKS = LIST_ITEM_BLOCKS;
exports.MARKS = MARKS$1;

@@ -1045,6 +1043,7 @@ exports.TOP_LEVEL_BLOCKS = TOP_LEVEL_BLOCKS;

var richTextTypes_es5_4 = richTextTypes_es5.INLINES;
var richTextTypes_es5_5 = richTextTypes_es5.MARKS;
var richTextTypes_es5_6 = richTextTypes_es5.TOP_LEVEL_BLOCKS;
var richTextTypes_es5_7 = richTextTypes_es5.VOID_BLOCKS;
var richTextTypes_es5_8 = richTextTypes_es5.helpers;
var richTextTypes_es5_5 = richTextTypes_es5.LIST_ITEM_BLOCKS;
var richTextTypes_es5_6 = richTextTypes_es5.MARKS;
var richTextTypes_es5_7 = richTextTypes_es5.TOP_LEVEL_BLOCKS;
var richTextTypes_es5_8 = richTextTypes_es5.VOID_BLOCKS;
var richTextTypes_es5_9 = richTextTypes_es5.helpers;

@@ -1134,6 +1133,6 @@ /**

var nodeTextValue;
if (richTextTypes_es5_8.isText(node)) {
if (richTextTypes_es5_9.isText(node)) {
nodeTextValue = node.value;
}
else if (richTextTypes_es5_8.isBlock(node) || richTextTypes_es5_8.isInline(node)) {
else if (richTextTypes_es5_9.isBlock(node) || richTextTypes_es5_9.isInline(node)) {
nodeTextValue = documentToPlainTextString(node, blockDivisor);

@@ -1145,3 +1144,3 @@ if (!nodeTextValue.length) {

var nextNode = rootNode.content[i + 1];
var isNextNodeBlock = nextNode && richTextTypes_es5_8.isBlock(nextNode);
var isNextNodeBlock = nextNode && richTextTypes_es5_9.isBlock(nextNode);
var divisor = isNextNodeBlock ? blockDivisor : '';

@@ -1148,0 +1147,0 @@ return acc + nodeTextValue + divisor;

{
"name": "@contentful/rich-text-plain-text-renderer",
"version": "15.3.3",
"version": "15.3.5",
"main": "dist/rich-text-plain-text-renderer.es5.js",

@@ -27,3 +27,3 @@ "typings": "dist/types/index.d.ts",

"dependencies": {
"@contentful/rich-text-types": "^15.3.3"
"@contentful/rich-text-types": "^15.3.5"
},

@@ -43,3 +43,3 @@ "devDependencies": {

},
"gitHead": "c9c7d7b8a23e4680b7caf33814eff71bc661c636"
"gitHead": "3800ad52efd72a20b03c133c6f35c6343adb6565"
}

Sorry, the diff of this file is not supported yet