prosemirror-model
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -0,1 +1,7 @@ | ||
## 1.6.2 (2018-10-01) | ||
### Bug fixes | ||
Prevent [`ContentMatch.findWrapping`](https://prosemirror.net/docs/ref/#model.ContentMatch.findWrapping) from returning node types with required attributes. | ||
## 1.6.1 (2018-07-24) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "ProseMirror's document model", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -119,3 +119,3 @@ import {Fragment} from "./fragment" | ||
let type = match.next[i] | ||
if (!type.isLeaf && !(type.name in seen) && (!current.type || match.next[i + 1].validEnd)) { | ||
if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || match.next[i + 1].validEnd)) { | ||
active.push({match: type.contentMatch, type, via: current}) | ||
@@ -122,0 +122,0 @@ seen[type.name] = true |
@@ -285,3 +285,5 @@ import {Fragment} from "./fragment" | ||
contentMatchAt(index) { | ||
return this.type.contentMatch.matchFragment(this.content, 0, index) | ||
let match = this.type.contentMatch.matchFragment(this.content, 0, index) | ||
if (!match) throw new Error("Called contentMatchAt on a node with invalid content") | ||
return match | ||
} | ||
@@ -288,0 +290,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
492630
5957