Socket
Socket
Sign inDemoInstall

@prismicio/richtext

Package Overview
Dependencies
1
Maintainers
18
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.1.0

6

dist/index.js

@@ -87,2 +87,3 @@ import { RichTextNodeType } from '@prismicio/types';

const spanEnd = span.end - parentSpanStart;
const text = node.text.slice(spanStart, spanEnd);
const childSpans = [];

@@ -100,5 +101,6 @@ for (let j = i; j < mutSpans.length; j++) {

}
children.push(createTreeNode(span, textNodeSpansToTreeNodeChildren(childSpans, {
const spanWithText = { ...span, text };
children.push(createTreeNode(spanWithText, textNodeSpansToTreeNodeChildren(childSpans, {
...node,
text: node.text.slice(spanStart, spanEnd)
text
}, span)));

@@ -105,0 +107,0 @@ if (spanEnd < node.text.length) {

{
"name": "@prismicio/richtext",
"version": "2.0.1",
"version": "2.1.0",
"description": "A parser and serializer for Prismic's Rich Text format",

@@ -26,2 +26,3 @@ "keywords": [

"module": "dist/index.js",
"react-native": "dist/index.js",
"types": "dist/index.d.ts",

@@ -52,2 +53,3 @@ "files": [

"ava": "^4.0.1",
"esbuild-register": "^3.3.2",
"eslint": "^8.7.0",

@@ -62,3 +64,2 @@ "eslint-config-prettier": "^8.3.0",

"standard-version": "^9.3.2",
"ts-eager": "^2.0.2",
"typescript": "^4.5.5"

@@ -71,4 +72,3 @@ },

"access": "public"
},
"react-native": "dist/index.js"
}
}

@@ -61,3 +61,3 @@ <!--

```
Copyright 2013-2021 Prismic <contact@prismic.io> (https://prismic.io)
Copyright 2013-2022 Prismic <contact@prismic.io> (https://prismic.io)

@@ -64,0 +64,0 @@ Licensed under the Apache License, Version 2.0 (the "License");

@@ -149,2 +149,3 @@ import {

const spanEnd = span.end - parentSpanStart;
const text = node.text.slice(spanStart, spanEnd);

@@ -170,5 +171,6 @@ const childSpans: RTInlineNode[] = [];

const spanWithText = { ...span, text };
children.push(
createTreeNode(
span,
spanWithText,
textNodeSpansToTreeNodeChildren(

@@ -178,3 +180,3 @@ childSpans,

...node,
text: node.text.slice(spanStart, spanEnd),
text,
},

@@ -181,0 +183,0 @@ span,

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc