Socket
Socket
Sign inDemoInstall

prosemirror-transform

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-transform - npm Package Compare versions

Comparing version 0.12.0 to 0.12.1

2

dist/replace.js

@@ -45,3 +45,3 @@ var ref = require("prosemirror-model");

// Replace the part of the document between `from` and `to` with the
// part of the `source` between `start` and `end`.
// given `slice`.
Transform.prototype.replace = function(from, to, slice) {

@@ -48,0 +48,0 @@ if ( to === void 0 ) to = from;

@@ -137,4 +137,5 @@ var ref = require("prosemirror-model");

// Ensure all markup that isn't allowed in the new node type is cleared
this$1.clearMarkupFor(this$1.mapping.map(pos, 1, mapFrom), type, attrs)
var startM = this$1.mapping.map(pos, 1, mapFrom), endM = this$1.mapping.map(pos + node.nodeSize, 1, mapFrom)
this$1.clearMarkupFor(this$1.mapping.slice(mapFrom).map(pos, 1), type, attrs)
var mapping = this$1.mapping.slice(mapFrom)
var startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1)
this$1.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1,

@@ -141,0 +142,0 @@ new Slice(Fragment.from(type.create(attrs)), 0, 0), 1, true))

{
"name": "prosemirror-transform",
"version": "0.12.0",
"version": "0.12.1",
"description": "ProseMirror document transformations",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -37,3 +37,3 @@ const {Fragment, Slice} = require("prosemirror-model")

// Replace the part of the document between `from` and `to` with the
// part of the `source` between `start` and `end`.
// given `slice`.
Transform.prototype.replace = function(from, to = from, slice = Slice.empty) {

@@ -40,0 +40,0 @@ let step = replaceStep(this.doc, from, to, slice)

@@ -121,4 +121,5 @@ const {Slice, Fragment} = require("prosemirror-model")

// Ensure all markup that isn't allowed in the new node type is cleared
this.clearMarkupFor(this.mapping.map(pos, 1, mapFrom), type, attrs)
let startM = this.mapping.map(pos, 1, mapFrom), endM = this.mapping.map(pos + node.nodeSize, 1, mapFrom)
this.clearMarkupFor(this.mapping.slice(mapFrom).map(pos, 1), type, attrs)
let mapping = this.mapping.slice(mapFrom)
let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1)
this.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1,

@@ -125,0 +126,0 @@ new Slice(Fragment.from(type.create(attrs)), 0, 0), 1, true))

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc