prosemirror-model
Advanced tools
Comparing version 1.6.4 to 1.7.0
@@ -0,1 +1,7 @@ | ||
## 1.7.0 (2019-01-29) | ||
### New features | ||
Mark specs now support a property [`spanning`](https://prosemirror.net/docs/ref/#model.MarkSpec.spanning) which, when set to `false`, prevents the mark's DOM markup from spanning multiple nodes, so that a separate wrapper is created for each adjacent marked node. | ||
## 1.6.4 (2019-01-05) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.6.4", | ||
"version": "1.7.0", | ||
"description": "ProseMirror's document model", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -432,2 +432,6 @@ import OrderedMap from "orderedmap" | ||
// | ||
// spanning:: ?bool | ||
// Determines whether marks of this type can span multiple adjacent | ||
// nodes when serialized to DOM/HTML. Defaults to true. | ||
// | ||
// toDOM:: ?(mark: Mark, inline: bool) → DOMOutputSpec | ||
@@ -434,0 +438,0 @@ // Defines the default way marks of this type should be serialized |
@@ -55,3 +55,3 @@ // DOMOutputSpec:: interface | ||
if (!this.marks[next.type.name]) { rendered++; continue } | ||
if (!next.eq(active[keep])) break | ||
if (!next.eq(active[keep]) || next.type.spec.spanning === false) break | ||
keep += 2; rendered++ | ||
@@ -58,0 +58,0 @@ } |
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
494090
5969