Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-model

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-model - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.6.3 (2018-10-26)
### Bug fixes
The DOM parser now drops whitespace after BR nodes when not in whitespace-preserving mode.
## 1.6.2 (2018-10-01)

@@ -2,0 +8,0 @@

2

package.json
{
"name": "prosemirror-model",
"version": "1.6.2",
"version": "1.6.3",
"description": "ProseMirror's document model",

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

# prosemirror-model
[ [**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-model/blob/master/CHANGELOG.md) ]

@@ -5,0 +5,0 @@ This is a [core module](http://prosemirror.net/docs/ref/#model) of [ProseMirror](http://prosemirror.net).

@@ -377,8 +377,11 @@ import {Fragment} from "./fragment"

value = value.replace(/\s+/g, " ")
// If this starts with whitespace, and there is either no node
// before it or a node that ends with whitespace, strip the
// If this starts with whitespace, and there is no node before it, or
// a hard break, or a text node that ends with whitespace, strip the
// leading space.
if (/^\s/.test(value) && this.open == this.nodes.length - 1) {
let nodeBefore = top.content[top.content.length - 1]
if (!nodeBefore || nodeBefore.isText && /\s$/.test(nodeBefore.text))
let domNodeBefore = dom.previousSibling
if (!nodeBefore ||
(domNodeBefore && domNodeBefore.nodeName == 'BR') ||
(nodeBefore.isText && /\s$/.test(nodeBefore.text)))
value = value.slice(1)

@@ -385,0 +388,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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