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.13.0 to 1.13.1

6

CHANGELOG.md

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

## 1.13.1 (2020-12-20)
### Bug fixes
Fix a bug where nested marks of the same type would be applied to the wrong node when parsing from DOM.
## 1.13.0 (2020-12-11)

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

2

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

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

@@ -170,3 +170,3 @@ import {Fragment} from "./fragment"

if (this.tokens[this.tokens.length - 1] == "") this.tokens.pop()
if (this.tokens[0] == "") this.tokens.unshift()
if (this.tokens[0] == "") this.tokens.shift()
}

@@ -173,0 +173,0 @@

@@ -348,5 +348,5 @@ import {Fragment} from "./fragment"

popFromStashMark(markType) {
popFromStashMark(mark) {
for (let i = this.stashMarks.length - 1; i >= 0; i--)
if (this.stashMarks[i].type == markType) return this.stashMarks.splice(i, 1)[0]
if (mark.eq(this.stashMarks[i])) return this.stashMarks.splice(i, 1)[0]
}

@@ -359,4 +359,2 @@

!mark.isInSet(this.activeMarks)) {
let found = findSameTypeInSet(mark, this.activeMarks)
if (found) this.stashMarks.push(found)
this.activeMarks = mark.addToSet(this.activeMarks)

@@ -726,3 +724,3 @@ this.pendingMarks = mark.removeFromSet(this.pendingMarks)

addPendingMark(mark) {
let found = findSameTypeInSet(mark, this.top.pendingMarks)
let found = findSameMarkInSet(mark, this.top.pendingMarks)
if (found) this.top.stashMarks.push(found)

@@ -740,3 +738,3 @@ this.top.pendingMarks = mark.addToSet(this.top.pendingMarks)

level.activeMarks = mark.removeFromSet(level.activeMarks)
let stashMark = level.popFromStashMark(mark.type)
let stashMark = level.popFromStashMark(mark)
if (stashMark) level.activeMarks = stashMark.addToSet(level.activeMarks)

@@ -805,6 +803,6 @@ }

function findSameTypeInSet(mark, set) {
function findSameMarkInSet(mark, set) {
for (let i = 0; i < set.length; i++) {
if (mark.type == set[i].type) return set[i]
if (mark.eq(set[i])) return set[i]
}
}

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