prosemirror-inputrules
Advanced tools
Comparing version 0.21.0 to 0.22.0
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28824
+ Addedprosemirror-model@0.22.0(transitive)
+ Addedprosemirror-state@0.22.0(transitive)
+ Addedprosemirror-transform@0.22.2(transitive)
- Removedprosemirror-model@0.21.0(transitive)
- Removedprosemirror-state@0.21.0(transitive)
- Removedprosemirror-transform@0.21.1(transitive)
Updatedprosemirror-state@^0.22.0