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

prosemirror-state

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-state - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

10

dist/index.js

@@ -635,3 +635,3 @@ 'use strict';

if (inheritMarks !== false)
{ node = node.mark(this.storedMarks || selection.$from.marks(selection.to > selection.from)); }
{ node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to))); }
selection.replaceWith(this, node);

@@ -660,4 +660,8 @@ return this

if (!text) { return this.deleteRange(from, to) }
var node = schema.text(text, this.storedMarks || this.doc.resolve(from).marks(to > from));
return this.replaceRangeWith(from, to, node)
var marks = this.storedMarks;
if (!marks) {
var $from = this.doc.resolve(from);
marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));
}
return this.replaceRangeWith(from, to, schema.text(text, marks))
}

@@ -664,0 +668,0 @@ };

{
"name": "prosemirror-state",
"version": "1.0.0",
"version": "1.0.1",
"description": "ProseMirror editor state",

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

@@ -136,3 +136,3 @@ import {Transform} from "prosemirror-transform"

if (inheritMarks !== false)
node = node.mark(this.storedMarks || selection.$from.marks(selection.to > selection.from))
node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to)))
selection.replaceWith(this, node)

@@ -159,4 +159,8 @@ return this

if (!text) return this.deleteRange(from, to)
let node = schema.text(text, this.storedMarks || this.doc.resolve(from).marks(to > from))
return this.replaceRangeWith(from, to, node)
let marks = this.storedMarks
if (!marks) {
let $from = this.doc.resolve(from)
marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to))
}
return this.replaceRangeWith(from, to, schema.text(text, marks))
}

@@ -163,0 +167,0 @@ }

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