prosemirror-model
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -0,1 +1,7 @@ | ||
## 1.6.1 (2018-07-24) | ||
### Bug fixes | ||
Fix a bug where marks were sometimes parsed incorrectly. | ||
## 1.6.0 (2018-07-20) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "ProseMirror's document model", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -364,12 +364,6 @@ import {Fragment} from "./fragment" | ||
let style = dom.getAttribute("style") | ||
if (!style) { | ||
this.addElement(dom) | ||
} else { | ||
let marks = this.readStyles(parseStyles(style)) | ||
if (marks != null) { | ||
for (let i = 0; i < marks.length; i++) this.addPendingMark(marks[i]) | ||
this.addElement(dom) | ||
for (let i = 0; i < marks.length; i++) this.removePendingMark(marks[i]) | ||
} | ||
} | ||
let marks = style ? this.readStyles(parseStyles(style)) : null | ||
if (marks != null) for (let i = 0; i < marks.length; i++) this.addPendingMark(marks[i]) | ||
this.addElement(dom) | ||
if (marks != null) for (let i = 0; i < marks.length; i++) this.removePendingMark(marks[i]) | ||
} | ||
@@ -413,3 +407,3 @@ } | ||
if (rule && rule.skip.nodeType) dom = rule.skip | ||
let sync, top = this.top, oldMarks = top.activeMarks, oldNeedsBlock = this.needsBlock | ||
let sync, top = this.top, oldNeedsBlock = this.needsBlock | ||
if (blockTags.hasOwnProperty(name)) { | ||
@@ -421,3 +415,2 @@ sync = true | ||
if (sync) this.sync(top) | ||
top.activeMarks = oldMarks | ||
this.needsBlock = oldNeedsBlock | ||
@@ -600,3 +593,3 @@ } else { | ||
if (found > -1) { | ||
this.pendingMarks.splice(mark, 1) | ||
this.pendingMarks.splice(found, 1) | ||
} else { | ||
@@ -603,0 +596,0 @@ let top = this.top |
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
491890
5953