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.16.0 to 1.16.1

6

CHANGELOG.md

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

## 1.16.1 (2021-12-29)
### Bug fixes
Fix a bug in the way whitespace-preservation options were handled in `DOMParser`.
## 1.16.0 (2021-12-27)

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

2

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

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

@@ -295,5 +295,6 @@ import {Fragment} from "./fragment"

function wsOptionsFor(type, preserveWhitespace) {
return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |
(preserveWhitespace === "full" || (preserveWhitespace == null && type && type.whitespace == "pre") ? OPT_PRESERVE_WS_FULL : 0)
function wsOptionsFor(type, preserveWhitespace, base) {
if (preserveWhitespace != null) return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |
(preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0)
return type && type.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT
}

@@ -384,3 +385,3 @@

let topNode = options.topNode, topContext
let topOptions = wsOptionsFor(null, options.preserveWhitespace) | (open ? OPT_OPEN_LEFT : 0)
let topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (open ? OPT_OPEN_LEFT : 0)
if (topNode)

@@ -627,3 +628,3 @@ topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, Mark.none, true,

top.match = top.match && top.match.matchType(type, attrs)
let options = preserveWS == null ? top.options & ~OPT_OPEN_LEFT : wsOptionsFor(type, preserveWS)
let options = wsOptionsFor(type, preserveWS, top.options)
if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0) options |= OPT_OPEN_LEFT

@@ -630,0 +631,0 @@ this.nodes.push(new NodeContext(type, attrs, top.activeMarks, top.pendingMarks, solid, null, options))

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

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