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

prosemirror-model

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-model - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

2

package.json
{
"name": "prosemirror-model",
"version": "1.0.1",
"version": "1.1.0",
"description": "ProseMirror's document model",

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

@@ -82,9 +82,9 @@ import {Fragment} from "./fragment"

// :: (Fragment) → Slice
// :: (Fragment, ?bool) → Slice
// Create a slice from a fragment by taking the maximum possible
// open value on both side of the fragment.
static maxOpen(fragment) {
static maxOpen(fragment, openIsolating=true) {
let openStart = 0, openEnd = 0
for (let n = fragment.firstChild; n && !n.isLeaf; n = n.firstChild) openStart++
for (let n = fragment.lastChild; n && !n.isLeaf; n = n.lastChild) openEnd++
for (let n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) openStart++
for (let n = fragment.lastChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.lastChild) openEnd++
return new Slice(fragment, openStart, openEnd)

@@ -91,0 +91,0 @@ }

@@ -152,3 +152,3 @@ import {Mark} from "./mark"

// :: () → ?[Mark]
// :: (ResolvedPos) → ?[Mark]
// Get the marks after the current position, if any, except those

@@ -155,0 +155,0 @@ // that are non-inclusive and not present at position `$end`. This

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