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

prosemirror-model

Package Overview
Dependencies
Maintainers
0
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.21.2 to 1.21.3

6

CHANGELOG.md

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

## 1.21.3 (2024-06-26)
### Bug fixes
Fix an issue where parse rules for CSS properties that were shorthands for a number of more detailed properties weren't matching properly.
## 1.21.2 (2024-06-25)

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

2

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

@@ -5,0 +5,0 @@ "type": "module",

@@ -184,2 +184,4 @@ import {Fragment} from "./fragment"

/// @internal
matchedStyles: readonly string[]
/// @internal
normalizeLists: boolean

@@ -196,5 +198,11 @@

) {
let matchedStyles: string[] = this.matchedStyles = []
rules.forEach(rule => {
if (isTagRule(rule)) this.tags.push(rule)
else if (isStyleRule(rule)) this.styles.push(rule)
if (isTagRule(rule)) {
this.tags.push(rule)
} else if (isStyleRule(rule)) {
let prop = /[^=]*/.exec(rule.style)![0]
if (matchedStyles.indexOf(prop) < 0) matchedStyles.push(prop)
this.styles.push(rule)
}
})

@@ -547,6 +555,11 @@

let add = Mark.none, remove = Mark.none
for (let i = 0, l = styles.length; i < l; i++) {
let name = styles.item(i)
for (let after: StyleParseRule | undefined = undefined;;) {
let rule = this.parser.matchStyle(name, styles.getPropertyValue(name), this, after)
// Because many properties will only show up in 'normalized' form
// in `style.item` (i.e. text-decoration becomes
// text-decoration-line, text-decoration-color, etc), we directly
// query the styles mentioned in our rules instead of iterating
// over the items.
if (styles.length) for (let i = 0; i < this.parser.matchedStyles.length; i++) {
let name = this.parser.matchedStyles[i], value = styles.getPropertyValue(name)
if (value) for (let after: StyleParseRule | undefined = undefined;;) {
let rule = this.parser.matchStyle(name, value, this, after)
if (!rule) break

@@ -553,0 +566,0 @@ if (rule.ignore) return null

Sorry, the diff of this file is not supported yet

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

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