prosemirror-model
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -0,1 +1,7 @@ | ||
## 1.11.1 (2020-09-11) | ||
### Bug fixes | ||
Fix an issue where an inner node's mark information could reset the same mark provided by an outer node in the DOM parser. | ||
## 1.11.0 (2020-07-08) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"description": "ProseMirror's document model", | ||
@@ -27,4 +27,4 @@ "main": "dist/index.js", | ||
"prosemirror-test-builder": "^1.0.0", | ||
"rollup": "^1.26.3", | ||
"@rollup/plugin-buble": "^0.20.0" | ||
"rollup": "^2.26.3", | ||
"@rollup/plugin-buble": "^0.21.3" | ||
}, | ||
@@ -31,0 +31,0 @@ "scripts": { |
@@ -305,2 +305,4 @@ import {Fragment} from "./fragment" | ||
this.pendingMarks = pendingMarks | ||
// Nested Marks with same type | ||
this.stashMarks = [] | ||
} | ||
@@ -341,2 +343,7 @@ | ||
popFromStashMark(markType) { | ||
for (let i = this.stashMarks.length - 1; i >= 0; i--) | ||
if (this.stashMarks[i].type == markType) return this.stashMarks.splice(i, 1)[0] | ||
} | ||
applyPending(nextType) { | ||
@@ -704,2 +711,4 @@ for (let i = 0, pending = this.pendingMarks; i < pending.length; i++) { | ||
addPendingMark(mark) { | ||
let found = this.top.pendingMarks.findIndex(_mark => _mark.type == mark.type) | ||
if (found > -1) this.top.stashMarks.push(mark) | ||
this.top.pendingMarks = mark.addToSet(this.top.pendingMarks) | ||
@@ -712,4 +721,9 @@ } | ||
let found = level.pendingMarks.lastIndexOf(mark) | ||
if (found > -1) level.pendingMarks = mark.removeFromSet(level.pendingMarks) | ||
else level.activeMarks = mark.removeFromSet(level.activeMarks) | ||
if (found > -1) { | ||
level.pendingMarks = mark.removeFromSet(level.pendingMarks) | ||
} else { | ||
level.activeMarks = mark.removeFromSet(level.activeMarks) | ||
let stashMark = level.popFromStashMark(mark.type) | ||
if (stashMark) level.activeMarks = stashMark.addToSet(level.activeMarks) | ||
} | ||
if (level == upto) break | ||
@@ -716,0 +730,0 @@ } |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
884177
9108