Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-transform

Package Overview
Dependencies
Maintainers
1
Versions
73
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.4.0 to 1.4.1

6

CHANGELOG.md

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

## 1.4.1 (2022-03-31)
### Bug fixes
`replaceRange` will now close multiple defining parent nodes when appropriate.
## 1.4.0 (2022-03-21)

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

2

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

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -393,13 +393,11 @@ import {Fragment, Slice} from "prosemirror-model"

}
// Back up if the node directly above openStart, or the node above
// that separated only by a non-defining textblock node, is defining.
if (preferredDepth > 0 && definesContent(leftNodes[preferredDepth - 1].type) &&
$from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 1].type)
preferredDepth -= 1
else if (preferredDepth >= 2 &&
leftNodes[preferredDepth - 1].isTextblock &&
definesContent(leftNodes[preferredDepth - 2].type) &&
$from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 2].type)
preferredDepth -= 2
// Back up preferredDepth to cover defining textblocks directly
// above it, possibly skipping a non-defining textblock.
for (let d = preferredDepth - 1; d >= 0; d--) {
let type = leftNodes[d].type, def = definesContent(type)
if (def && $from.node(preferredTargetIndex).type != type) preferredDepth = d
else if (def || !type.isTextblock) break
}
for (let j = slice.openStart; j >= 0; j--) {

@@ -406,0 +404,0 @@ let openDepth = (j + preferredDepth + 1) % (slice.openStart + 1)

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