prosemirror-model
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -0,1 +1,11 @@ | ||
## 1.6.0 (2018-07-20) | ||
### Bug fixes | ||
Fix issue where marks would be applied to the wrong node when parsing a slice from DOM. | ||
### New features | ||
Adds a new node spec property, [`toDebugString`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDebugString), making it possible to customize your nodes' `toString` behavior. | ||
## 1.5.0 (2018-05-31) | ||
@@ -2,0 +12,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "ProseMirror's document model", | ||
@@ -30,3 +30,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"test": "mocha test/test-*.js", | ||
"test": "node etc/link-self.js && mocha test/test-*.js", | ||
"build": "rollup -c", | ||
@@ -33,0 +33,0 @@ "watch": "rollup -c -w", |
@@ -519,3 +519,3 @@ import {Fragment} from "./fragment" | ||
let block = this.textblockFromContext() | ||
if (block) this.enter(block) | ||
if (block) this.enterInner(block) | ||
} | ||
@@ -522,0 +522,0 @@ if (this.findPlace(node)) { |
@@ -275,2 +275,3 @@ import {Fragment} from "./fragment" | ||
toString() { | ||
if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this) | ||
let name = this.type.name | ||
@@ -378,3 +379,6 @@ if (this.content.size) | ||
toString() { return wrapMarks(this.marks, JSON.stringify(this.text)) } | ||
toString() { | ||
if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this) | ||
return wrapMarks(this.marks, JSON.stringify(this.text)) | ||
} | ||
@@ -381,0 +385,0 @@ get textContent() { return this.text } |
@@ -399,2 +399,6 @@ import OrderedMap from "orderedmap" | ||
// parsing rules in your schema. | ||
// | ||
// toDebugString:: ?(node: Node) -> string | ||
// Defines the default way a node of this type should be serialized | ||
// to a string representation for debugging (e.g. in error messages). | ||
@@ -401,0 +405,0 @@ // MarkSpec:: interface |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
492270
23
5967
1