@sveltia/ui 0.31.5 → 0.31.7
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.
|
@@ -228,7 +228,7 @@ button.link .label {
|
|
|
228
228
|
text-underline-offset: 2px;
|
|
229
229
|
white-space: normal;
|
|
230
230
|
}
|
|
231
|
-
:global(:is(:root, :host)[data-underline-links=
|
|
231
|
+
:global(:is(:root, :host)[data-underline-links='true']) button.link .label {
|
|
232
232
|
text-decoration: underline;
|
|
233
233
|
}
|
|
234
234
|
button.link:is(:hover, :focus, :active) .label {
|
|
@@ -225,10 +225,11 @@ const onEditorUpdate = (editor) => {
|
|
|
225
225
|
// @see https://github.com/sveltia/sveltia-cms/issues/430
|
|
226
226
|
// @see https://github.com/sveltia/sveltia-cms/issues/512
|
|
227
227
|
.replace(/\\([_\\])/g, '$1')
|
|
228
|
-
// Replace
|
|
229
|
-
//
|
|
228
|
+
// Replace encoded spaces with regular spaces. The HTML entity can appear with a
|
|
229
|
+
// combination of bold and italic text
|
|
230
230
|
// @see https://github.com/sveltia/sveltia-cms/issues/511
|
|
231
|
-
.
|
|
231
|
+
// @see https://github.com/sveltia/sveltia-cms/issues/534
|
|
232
|
+
.replace(/ /g, ' '),
|
|
232
233
|
selection: getSelectionTypes(),
|
|
233
234
|
},
|
|
234
235
|
}),
|
|
@@ -408,6 +409,24 @@ export const convertMarkdownToLexical = async (editor, value) => {
|
|
|
408
409
|
),
|
|
409
410
|
);
|
|
410
411
|
|
|
412
|
+
// Split multiline formatting into separate lines to prevent Markdown parsing issues
|
|
413
|
+
// @see https://github.com/sveltia/sveltia-cms/issues/548
|
|
414
|
+
value = value
|
|
415
|
+
.replace(/_([^_\n]+?)\n([^_\n]+?)_/gm, '_$1_\n_$2_')
|
|
416
|
+
.replace(/\*\*([^*\n]+?)\n([^*\n]+?)\*\*/gm, '**$1**\n**$2**')
|
|
417
|
+
.replace(/~~([^~\n]+?)\n([^~\n]+?)~~/gm, '~~$1~~\n~~$2~~')
|
|
418
|
+
.replace(/`([^`\n]+?)\n([^`\n]+?)`/gm, '`$1`\n`$2`');
|
|
419
|
+
|
|
420
|
+
// Increase list indentation levels to prevent Markdown parsing issues: Slate uses 2 spaces for
|
|
421
|
+
// each indentation level, whereas Lexical uses 4 spaces
|
|
422
|
+
// @see https://github.com/sveltia/sveltia-cms/issues/549
|
|
423
|
+
if (value.match(/^\s{2}(?:-|\+|\*|\d+\.)\s/m)) {
|
|
424
|
+
value = value.replace(
|
|
425
|
+
/^(\s+)(-|\+|\*|\d+\.)/gm,
|
|
426
|
+
(_match, p1, p2) => `${' '.repeat(p1.length * 2)}${p2}`,
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
411
430
|
return new Promise((resolve, reject) => {
|
|
412
431
|
editor.update(() => {
|
|
413
432
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -28,31 +28,31 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
31
|
-
"@sveltejs/kit": "^2.
|
|
32
|
-
"@sveltejs/package": "^2.5.
|
|
31
|
+
"@sveltejs/kit": "^2.49.0",
|
|
32
|
+
"@sveltejs/package": "^2.5.6",
|
|
33
33
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
34
|
-
"cspell": "^9.
|
|
34
|
+
"cspell": "^9.3.2",
|
|
35
35
|
"eslint": "^8.57.1",
|
|
36
36
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
37
37
|
"eslint-config-prettier": "^10.1.8",
|
|
38
38
|
"eslint-plugin-import": "^2.32.0",
|
|
39
|
-
"eslint-plugin-jsdoc": "^61.
|
|
39
|
+
"eslint-plugin-jsdoc": "^61.4.0",
|
|
40
40
|
"eslint-plugin-svelte": "^2.46.1",
|
|
41
|
-
"oxlint": "^1.
|
|
41
|
+
"oxlint": "^1.29.0",
|
|
42
42
|
"postcss": "^8.5.6",
|
|
43
43
|
"postcss-html": "^1.8.0",
|
|
44
44
|
"prettier": "^3.6.2",
|
|
45
45
|
"prettier-plugin-svelte": "^3.4.0",
|
|
46
|
-
"sass": "^1.
|
|
47
|
-
"stylelint": "^16.
|
|
46
|
+
"sass": "^1.94.2",
|
|
47
|
+
"stylelint": "^16.26.0",
|
|
48
48
|
"stylelint-config-recommended-scss": "^16.0.2",
|
|
49
49
|
"stylelint-scss": "^6.12.1",
|
|
50
|
-
"svelte": "^5.43.
|
|
51
|
-
"svelte-check": "^4.3.
|
|
50
|
+
"svelte": "^5.43.14",
|
|
51
|
+
"svelte-check": "^4.3.4",
|
|
52
52
|
"svelte-preprocess": "^6.0.3",
|
|
53
53
|
"tslib": "^2.8.1",
|
|
54
|
-
"vite": "^7.
|
|
55
|
-
"vitest": "^4.0.
|
|
54
|
+
"vite": "^7.2.4",
|
|
55
|
+
"vitest": "^4.0.13"
|
|
56
56
|
},
|
|
57
57
|
"exports": {
|
|
58
58
|
".": {
|