@prosekit/extensions 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,8 +84,7 @@ function defineCodeBlockInputRule() {
|
|
84
84
|
const getAttrs = (match) => {
|
85
85
|
return { language: match[1] || "" };
|
86
86
|
};
|
87
|
-
|
88
|
-
return [inputRule];
|
87
|
+
return textblockTypeInputRule(/^```(\S*)\s$/, nodeType, getAttrs);
|
89
88
|
});
|
90
89
|
}
|
91
90
|
function defineCodeBlockCommands() {
|
@@ -44,16 +44,11 @@ function defineHeadingKeymap() {
|
|
44
44
|
function defineHeadingInputRule() {
|
45
45
|
return defineInputRule(({ schema }) => {
|
46
46
|
const nodeSpec = getNodeType(schema, "heading");
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
const level = (_b = (_a = match[1]) == null ? void 0 : _a.length) != null ? _b : 1;
|
53
|
-
return { level };
|
54
|
-
}
|
55
|
-
);
|
56
|
-
return [inputRule];
|
47
|
+
return textblockTypeInputRule(/^(#{1,6})\s/, nodeSpec, (match) => {
|
48
|
+
var _a, _b;
|
49
|
+
const level = (_b = (_a = match[1]) == null ? void 0 : _a.length) != null ? _b : 1;
|
50
|
+
return { level };
|
51
|
+
});
|
57
52
|
});
|
58
53
|
}
|
59
54
|
function defineHeadingCommands() {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/extensions",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.22",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -116,7 +116,7 @@
|
|
116
116
|
"dist"
|
117
117
|
],
|
118
118
|
"dependencies": {
|
119
|
-
"@prosekit/core": "^0.0.
|
119
|
+
"@prosekit/core": "^0.0.20",
|
120
120
|
"@prosekit/pm": "^0.0.7",
|
121
121
|
"highlight.js": "^11.9.0",
|
122
122
|
"prosemirror-flat-list": "^0.4.3",
|