Socket
Socket
Sign inDemoInstall

prosemirror-transform

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-transform - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.3.4 (2022-02-04)
### Bug fixes
Make sure that constructing an empty `StepMap` returns `StepMap.empty`.
## 1.3.3 (2021-09-29)

@@ -2,0 +8,0 @@

4

package.json
{
"name": "prosemirror-transform",
"version": "1.3.3",
"version": "1.3.4",
"description": "ProseMirror document transformations",

@@ -23,3 +23,3 @@ "main": "dist/index.js",

"devDependencies": {
"mocha": "^3.0.2",
"mocha": "^9.1.2",
"ist": "^1.0.0",

@@ -26,0 +26,0 @@ "prosemirror-test-builder": "^1.0.0",

@@ -60,2 +60,3 @@ // Mappable:: interface

constructor(ranges, inverted = false) {
if (!ranges.length && StepMap.empty) return StepMap.empty
this.ranges = ranges

@@ -62,0 +63,0 @@ this.inverted = inverted

@@ -106,4 +106,10 @@ import {Slice, Fragment} from "prosemirror-model"

let content = Fragment.empty
for (let i = wrappers.length - 1; i >= 0; i--)
for (let i = wrappers.length - 1; i >= 0; i--) {
if (content.size) {
let match = wrappers[i].type.contentMatch.matchFragment(content)
if (!match || !match.validEnd)
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")
}
content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content))
}

@@ -110,0 +116,0 @@ let start = range.start, end = range.end

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc