@byline/richtext-lexical 3.4.0 → 3.4.1
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.
|
@@ -121,7 +121,10 @@ const ADMONITION = {
|
|
|
121
121
|
return body ? `${heading}\n${body}\n:::` : `${heading}\n:::`;
|
|
122
122
|
},
|
|
123
123
|
regExpStart: ADMONITION_START_REG_EXP,
|
|
124
|
-
regExpEnd:
|
|
124
|
+
regExpEnd: {
|
|
125
|
+
optional: true,
|
|
126
|
+
regExp: ADMONITION_END_REG_EXP
|
|
127
|
+
},
|
|
125
128
|
replace: (rootNode, children, startMatch, _endMatch, linesInBetween)=>{
|
|
126
129
|
const rawType = startMatch[1];
|
|
127
130
|
if (!ADMONITION_TYPES.has(rawType)) return false;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "3.4.
|
|
6
|
+
"version": "3.4.1",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.9.0"
|
|
9
9
|
},
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"npm-run-all": "^4.1.5",
|
|
78
78
|
"prism-react-renderer": "^2.4.1",
|
|
79
79
|
"react-error-boundary": "^6.1.1",
|
|
80
|
-
"@byline/client": "3.4.
|
|
81
|
-
"@byline/
|
|
82
|
-
"@byline/ui": "3.4.
|
|
83
|
-
"@byline/
|
|
80
|
+
"@byline/client": "3.4.1",
|
|
81
|
+
"@byline/admin": "3.4.1",
|
|
82
|
+
"@byline/ui": "3.4.1",
|
|
83
|
+
"@byline/core": "3.4.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"react": "^19.0.0",
|
|
@@ -236,7 +236,12 @@ export const ADMONITION: MultilineElementTransformer = {
|
|
|
236
236
|
return body ? `${heading}\n${body}\n:::` : `${heading}\n:::`
|
|
237
237
|
},
|
|
238
238
|
regExpStart: ADMONITION_START_REG_EXP,
|
|
239
|
-
|
|
239
|
+
// `optional` is required for the as-you-type shortcut path to run this
|
|
240
|
+
// transformer at all: runMultilineElementTransformers skips any multiline
|
|
241
|
+
// transformer whose regExpEnd is non-optional (the closing ::: hasn't been
|
|
242
|
+
// typed yet when the start line fires). The toggle/import path still honours
|
|
243
|
+
// the explicit ::: end when present, falling back to EOF only if it's absent.
|
|
244
|
+
regExpEnd: { optional: true, regExp: ADMONITION_END_REG_EXP },
|
|
240
245
|
replace: (rootNode, children, startMatch, _endMatch, linesInBetween) => {
|
|
241
246
|
const rawType = startMatch[1]
|
|
242
247
|
if (!ADMONITION_TYPES.has(rawType)) {
|