prosemirror-commands
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -0,1 +1,7 @@ | ||
## 1.0.8 (2019-05-14) | ||
### Bug fixes | ||
Fix a crash caused by using a position potentially outside the document in [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock). | ||
## 1.0.7 (2018-04-09) | ||
@@ -2,0 +8,0 @@ |
@@ -321,3 +321,3 @@ 'use strict'; | ||
var types = atEnd && deflt ? [{type: deflt}] : null; | ||
var can = prosemirrorTransform.canSplit(tr.doc, $from.pos, 1, types); | ||
var can = prosemirrorTransform.canSplit(tr.doc, tr.mapping.map($from.pos), 1, types); | ||
if (!types && !can && prosemirrorTransform.canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt && [{type: deflt}])) { | ||
@@ -324,0 +324,0 @@ types = [{type: deflt}]; |
{ | ||
"name": "prosemirror-commands", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Editing commands for ProseMirror", | ||
@@ -5,0 +5,0 @@ "main": "dist/commands.js", |
# prosemirror-commands | ||
[ [**WEBSITE**](http://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror/blob/master/CHANGELOG.md) ] | ||
[ [**WEBSITE**](http://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-commands/blob/master/CHANGELOG.md) ] | ||
@@ -5,0 +5,0 @@ This is a [core module](http://prosemirror.net/docs/ref/#commands) of [ProseMirror](http://prosemirror.net). |
@@ -302,3 +302,3 @@ import {joinPoint, canJoin, findWrapping, liftTarget, canSplit, ReplaceAroundStep} from "prosemirror-transform" | ||
let types = atEnd && deflt ? [{type: deflt}] : null | ||
let can = canSplit(tr.doc, $from.pos, 1, types) | ||
let can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types) | ||
if (!types && !can && canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt && [{type: deflt}])) { | ||
@@ -305,0 +305,0 @@ types = [{type: deflt}] |
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
112650