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

prosemirror-inputrules

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-inputrules - npm Package Compare versions

Comparing version 0.21.0 to 0.22.0

8

dist/util.js

@@ -63,3 +63,3 @@ var ref = require("./inputrules");

function blockQuoteRule(nodeType) {
return wrappingInputRule(/^\s*> $/, nodeType)
return wrappingInputRule(/^\s*>\s$/, nodeType)
}

@@ -72,3 +72,3 @@ exports.blockQuoteRule = blockQuoteRule

function orderedListRule(nodeType) {
return wrappingInputRule(/^(\d+)\. $/, nodeType, function (match) { return ({order: +match[1]}); },
return wrappingInputRule(/^(\d+)\.\s$/, nodeType, function (match) { return ({order: +match[1]}); },
function (match, node) { return node.childCount + node.attrs.order == +match[1]; })

@@ -83,3 +83,3 @@ }

function bulletListRule(nodeType) {
return wrappingInputRule(/^\s*([-+*]) $/, nodeType)
return wrappingInputRule(/^\s*([-+*])\s$/, nodeType)
}

@@ -102,5 +102,5 @@ exports.bulletListRule = bulletListRule

function headingRule(nodeType, maxLevel) {
return textblockTypeInputRule(new RegExp("^(#{1," + maxLevel + "}) $"),
return textblockTypeInputRule(new RegExp("^(#{1," + maxLevel + "})\\s$"),
nodeType, function (match) { return ({level: match[1].length}); })
}
exports.headingRule = headingRule
{
"name": "prosemirror-inputrules",
"version": "0.21.0",
"version": "0.22.0",
"description": "Automatic transforms on text input for ProseMirror",

@@ -19,4 +19,4 @@ "main": "dist/index.js",

"dependencies": {
"prosemirror-state": "^0.21.0",
"prosemirror-transform": "^0.21.0"
"prosemirror-state": "^0.22.0",
"prosemirror-transform": "^0.22.0"
},

@@ -23,0 +23,0 @@ "devDependencies": {

@@ -60,3 +60,3 @@ const {InputRule} = require("./inputrules")

function blockQuoteRule(nodeType) {
return wrappingInputRule(/^\s*> $/, nodeType)
return wrappingInputRule(/^\s*>\s$/, nodeType)
}

@@ -69,3 +69,3 @@ exports.blockQuoteRule = blockQuoteRule

function orderedListRule(nodeType) {
return wrappingInputRule(/^(\d+)\. $/, nodeType, match => ({order: +match[1]}),
return wrappingInputRule(/^(\d+)\.\s$/, nodeType, match => ({order: +match[1]}),
(match, node) => node.childCount + node.attrs.order == +match[1])

@@ -80,3 +80,3 @@ }

function bulletListRule(nodeType) {
return wrappingInputRule(/^\s*([-+*]) $/, nodeType)
return wrappingInputRule(/^\s*([-+*])\s$/, nodeType)
}

@@ -99,5 +99,5 @@ exports.bulletListRule = bulletListRule

function headingRule(nodeType, maxLevel) {
return textblockTypeInputRule(new RegExp("^(#{1," + maxLevel + "}) $"),
return textblockTypeInputRule(new RegExp("^(#{1," + maxLevel + "})\\s$"),
nodeType, match => ({level: match[1].length}))
}
exports.headingRule = headingRule
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