prosemirror-transform
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -0,1 +1,7 @@ | ||
## 1.2.3 (2019-12-03) | ||
### Bug fixes | ||
Fix a crash in `deleteRange` that occurred when deleting a region that spans to the ends of two nodes at different depths. | ||
## 1.2.2 (2019-11-20) | ||
@@ -123,3 +129,3 @@ | ||
Fixes a crash in [`replace`](http://prosemirror.net/docs/ref/#transform.Transform.replace). | ||
Fixes a crash in [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace). | ||
@@ -130,3 +136,3 @@ ## 1.0.1 (2017-11-10) | ||
The errors raised by [`Transform.step`](http://prosemirror.net/docs/ref/#transform.Transform.step) now properly inherit from Error. | ||
The errors raised by [`Transform.step`](https://prosemirror.net/docs/ref/#transform.Transform.step) now properly inherit from Error. | ||
@@ -137,5 +143,5 @@ ## 1.0.0 (2017-10-13) | ||
When [`setBlockType`](http://prosemirror.net/docs/ref/#transform.Transform.setBlockType) comes across a textblock that can't be changed due to schema constraints, it skips it instead of failing. | ||
When [`setBlockType`](https://prosemirror.net/docs/ref/#transform.Transform.setBlockType) comes across a textblock that can't be changed due to schema constraints, it skips it instead of failing. | ||
[`canSplit`](http://prosemirror.net/docs/ref/#transform.canSplit) now returns false when the requested split goes through isolating nodes. | ||
[`canSplit`](https://prosemirror.net/docs/ref/#transform.canSplit) now returns false when the requested split goes through isolating nodes. | ||
@@ -146,3 +152,3 @@ ## 0.24.0 (2017-09-25) | ||
The `setNodeType` method on transforms is now more descriptively called [`setNodeMarkup`](http://prosemirror.net/docs/ref/version/0.24.0.html#transform.Transform.setNodeMarkup). The old name will continue to work with a warning until the next release. | ||
The `setNodeType` method on transforms is now more descriptively called [`setNodeMarkup`](https://prosemirror.net/docs/ref/version/0.24.0.html#transform.Transform.setNodeMarkup). The old name will continue to work with a warning until the next release. | ||
@@ -153,7 +159,7 @@ ## 0.23.0 (2017-09-13) | ||
[`Step.toJSON`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.Step.toJSON) no longer has a default implementation. | ||
[`Step.toJSON`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.Step.toJSON) no longer has a default implementation. | ||
Steps no longer have an `offset` method. Map them through a map created with [`StepMap.offset`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.StepMap^offset) instead. | ||
Steps no longer have an `offset` method. Map them through a map created with [`StepMap.offset`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.StepMap^offset) instead. | ||
The `clearMarkup` method on [`Transform`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform) is no longer supported (you probably needed [`clearIncompatible`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform.clearIncompatible) anyway). | ||
The `clearMarkup` method on [`Transform`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform) is no longer supported (you probably needed [`clearIncompatible`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform.clearIncompatible) anyway). | ||
@@ -164,9 +170,9 @@ ### Bug fixes | ||
Marks on open nodes at the left of a slice are no longer dropped by [`Transform.replace`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform.replace). | ||
Marks on open nodes at the left of a slice are no longer dropped by [`Transform.replace`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform.replace). | ||
### New features | ||
`StepMap` now has a static method [`offset`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.StepMap^offset), which can be used to create a map that offsets all positions by a given distance. | ||
`StepMap` now has a static method [`offset`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.StepMap^offset), which can be used to create a map that offsets all positions by a given distance. | ||
Transform objects now have a [`clearIncompatible`](http://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform.clearIncompatible) method that can help make sure a node's content matches another node type. | ||
Transform objects now have a [`clearIncompatible`](https://prosemirror.net/docs/ref/version/0.23.0.html#transform.Transform.clearIncompatible) method that can help make sure a node's content matches another node type. | ||
@@ -183,3 +189,3 @@ ## 0.22.2 (2017-07-06) | ||
Fix crash in [`canSplit`](http://prosemirror.net/docs/ref/version/0.22.0.html#transform.canSplit) when an array containing null fields is passed as fourth argument. | ||
Fix crash in [`canSplit`](https://prosemirror.net/docs/ref/version/0.22.0.html#transform.canSplit) when an array containing null fields is passed as fourth argument. | ||
@@ -190,5 +196,5 @@ ## 0.22.0 (2017-06-29) | ||
[`canSplit`](http://prosemirror.net/docs/ref/version/0.22.0.html#transform.canSplit) now returns false when given custom after-split node types that don't match the content at that point. | ||
[`canSplit`](https://prosemirror.net/docs/ref/version/0.22.0.html#transform.canSplit) now returns false when given custom after-split node types that don't match the content at that point. | ||
Fixes [`canLift`](http://prosemirror.net/docs/ref/version/0.22.0.html#transform.canLift) incorrectly returning null when lifting into an isolating node. | ||
Fixes [`canLift`](https://prosemirror.net/docs/ref/version/0.22.0.html#transform.canLift) incorrectly returning null when lifting into an isolating node. | ||
@@ -199,5 +205,5 @@ ## 0.21.1 (2017-05-16) | ||
[`addMark`](http://prosemirror.net/docs/ref/version/0.21.0.html#transform.Transform.addMark) no longer assumes marks always [exclude](http://prosemirror.net/docs/ref/version/0.21.0.html#model.MarkSpec.excludes) only themselves. | ||
[`addMark`](https://prosemirror.net/docs/ref/version/0.21.0.html#transform.Transform.addMark) no longer assumes marks always [exclude](https://prosemirror.net/docs/ref/version/0.21.0.html#model.MarkSpec.excludes) only themselves. | ||
`replaceRange`](http://prosemirror.net/docs/ref/version/0.21.0.html#transform.Transform.replaceRange) and [`deleteRange`](http://prosemirror.net/docs/ref/version/0.21.0.html#transform.Transform.deleteRange) will no longer expand the range across isolating node boundaries. | ||
`replaceRange`](https://prosemirror.net/docs/ref/version/0.21.0.html#transform.Transform.replaceRange) and [`deleteRange`](https://prosemirror.net/docs/ref/version/0.21.0.html#transform.Transform.deleteRange) will no longer expand the range across isolating node boundaries. | ||
@@ -214,9 +220,9 @@ ## 0.20.0 (2017-04-03) | ||
[`Transform.setNodeType`](http://prosemirror.net/docs/ref/version/0.18.0.html#transform.Transform.setNodeType) now takes an optional argument to set the new node's attributes. | ||
[`Transform.setNodeType`](https://prosemirror.net/docs/ref/version/0.18.0.html#transform.Transform.setNodeType) now takes an optional argument to set the new node's attributes. | ||
Steps now provide an [`offset`](http://prosemirror.net/docs/ref/version/0.18.0.html#transform.Step.offset) method, which makes it possible to create a copy the step with its position offset by a given amount. | ||
Steps now provide an [`offset`](https://prosemirror.net/docs/ref/version/0.18.0.html#transform.Step.offset) method, which makes it possible to create a copy the step with its position offset by a given amount. | ||
[`docChanged`](http://prosemirror.net/docs/ref/version/0.18.0.html#transform.Transform.docChanged) is now a property on the `Transform` class, rather than its `Transaction` subclass. | ||
[`docChanged`](https://prosemirror.net/docs/ref/version/0.18.0.html#transform.Transform.docChanged) is now a property on the `Transform` class, rather than its `Transaction` subclass. | ||
`Mapping` instances now have [`invert`](http://prosemirror.net/docs/ref/version/0.18.0.html#transform.Mapping.invert) and [`appendMappingInverted`](http://prosemirror.net/docs/ref/version/0.18.0.html#transform.Mapping.appendMappingInverted) methods to make mapping through them in reverse easier. | ||
`Mapping` instances now have [`invert`](https://prosemirror.net/docs/ref/version/0.18.0.html#transform.Mapping.invert) and [`appendMappingInverted`](https://prosemirror.net/docs/ref/version/0.18.0.html#transform.Mapping.appendMappingInverted) methods to make mapping through them in reverse easier. | ||
@@ -233,7 +239,7 @@ ## 0.15.0 (2016-12-10) | ||
Fix issue where [`Transform.replace`](http://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.replace) would, in specific circumstances, unneccessarily drop content. | ||
Fix issue where [`Transform.replace`](https://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.replace) would, in specific circumstances, unneccessarily drop content. | ||
### New features | ||
The new [`Transform`](http://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform) method [`replaceRange`](http://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.replaceRange), [`replaceRangeWith`](http://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.replaceRangeWith), and [`deleteRange`](http://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.deleteRange) provide a way to replace and delete content in a 'do what I mean' way, automatically expanding the replaced region over empty parent nodes and including the parent nodes in the inserted content when appropriate. | ||
The new [`Transform`](https://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform) method [`replaceRange`](https://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.replaceRange), [`replaceRangeWith`](https://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.replaceRangeWith), and [`deleteRange`](https://prosemirror.net/docs/ref/version/0.13.0.html#transform.Transform.deleteRange) provide a way to replace and delete content in a 'do what I mean' way, automatically expanding the replaced region over empty parent nodes and including the parent nodes in the inserted content when appropriate. | ||
@@ -265,20 +271,20 @@ ## 0.12.1 (2016-11-01) | ||
[`Transform`](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.Transform) objects now build up a `Mapping` | ||
[`Transform`](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.Transform) objects now build up a `Mapping` | ||
instead of an array of maps. | ||
`PosMap` was renamed to [`StepMap`](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.StepMap) to make it | ||
`PosMap` was renamed to [`StepMap`](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.StepMap) to make it | ||
clearer that this applies only to a single step (as opposed to | ||
[`Mapping`](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.Mapping). | ||
[`Mapping`](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.Mapping). | ||
The arguments to [`canSplit`](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.canSplit) and | ||
[`split`](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.Transform.split) were changed to make it | ||
The arguments to [`canSplit`](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.canSplit) and | ||
[`split`](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.Transform.split) were changed to make it | ||
possible to specify multiple split-off node types for splits with a | ||
depth greater than 1. | ||
Rename `joinable` to [`canJoin`](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.canJoin). | ||
Rename `joinable` to [`canJoin`](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.canJoin). | ||
### New features | ||
Steps can now be [merged](http://prosemirror.net/docs/ref/version/0.11.0.html#transform.Step.merge) in some | ||
Steps can now be [merged](https://prosemirror.net/docs/ref/version/0.11.0.html#transform.Step.merge) in some | ||
circumstances, which can be useful when storing a lot of them. | ||
{ | ||
"name": "prosemirror-transform", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "ProseMirror document transformations", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# prosemirror-transform | ||
[ [**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-transform/blob/master/CHANGELOG.md) ] | ||
[ [**WEBSITE**](https://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-transform/blob/master/CHANGELOG.md) ] | ||
This is a [core module](http://prosemirror.net/docs/ref/#transform) of [ProseMirror](http://prosemirror.net). | ||
This is a [core module](https://prosemirror.net/docs/ref/#transform) of [ProseMirror](https://prosemirror.net). | ||
ProseMirror is a well-behaved rich semantic content editor based on | ||
@@ -10,10 +10,10 @@ contentEditable, with support for collaborative editing and custom | ||
This [module](http://prosemirror.net/docs/ref/#transform) implements | ||
document [transforms](http://prosemirror\.net/docs/guide/#transform), | ||
This [module](https://prosemirror.net/docs/ref/#transform) implements | ||
document [transforms](https://prosemirror.net/docs/guide/#transform), | ||
which are used by the editor to treat changes as first-class values, | ||
which can be saved, shared, and reasoned about. | ||
The [project page](http://prosemirror.net) has more information, a | ||
number of [examples](http://prosemirror.net/examples/) and the | ||
[documentation](http://prosemirror.net/docs/). | ||
The [project page](https://prosemirror.net) has more information, a | ||
number of [examples](https://prosemirror.net/examples/) and the | ||
[documentation](https://prosemirror.net/docs/). | ||
@@ -20,0 +20,0 @@ This code is released under an |
@@ -529,3 +529,3 @@ import {Fragment, Slice} from "prosemirror-model" | ||
} | ||
for (let d = 1; d <= $from.depth; d++) { | ||
for (let d = 1; d <= $from.depth && d <= $to.depth; d++) { | ||
if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d) | ||
@@ -532,0 +532,0 @@ return this.delete($from.before(d), to) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
484418