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

prosemirror-view

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-view - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

package.json
{
"name": "prosemirror-view",
"version": "1.0.6",
"version": "1.0.7",
"description": "ProseMirror's view component",

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

"dependencies": {
"prosemirror-model": "^1.0.0",
"prosemirror-model": "^1.1.0",
"prosemirror-state": "^1.0.0",

@@ -23,0 +23,0 @@ "prosemirror-transform": "^1.0.0"

@@ -72,3 +72,3 @@ import {Slice, Fragment, DOMParser, DOMSerializer} from "prosemirror-model"

else // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent
slice = normalizeSiblings(slice, $context)
slice = Slice.maxOpen(normalizeSiblings(slice.content, $context), false)
view.someProp("transformPasted", f => { slice = f(slice) })

@@ -86,4 +86,4 @@ return slice

// fit anywhere in the schema.
function normalizeSiblings(slice, $context) {
if (slice.content.childCount < 2) return slice
function normalizeSiblings(fragment, $context) {
if (fragment.childCount < 2) return fragment
for (let d = $context.depth; d >= 0; d--) {

@@ -93,3 +93,3 @@ let parent = $context.node(d)

let lastWrap, result = []
slice.content.forEach(node => {
fragment.forEach(node => {
if (!result) return

@@ -108,5 +108,5 @@ let wrap = match.findWrapping(node.type), inLast

})
if (result) return Slice.maxOpen(Fragment.from(result))
if (result) return Fragment.from(result)
}
return slice
return fragment
}

@@ -113,0 +113,0 @@

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