From 047109f82160df68a44def7a89076e9e4ec92450 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Sat, 10 May 2025 22:56:36 +0800 Subject: [PATCH 1/4] Fix incorrect import of multiple inline math. --- apps/server/src/services/import/markdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/services/import/markdown.ts b/apps/server/src/services/import/markdown.ts index 8b7f8913d..a49a46897 100644 --- a/apps/server/src/services/import/markdown.ts +++ b/apps/server/src/services/import/markdown.ts @@ -25,7 +25,7 @@ class CustomMarkdownRenderer extends Renderer { `\\\[$1\\\]`); // Inline math - text = text.replaceAll(/(?\\\($1\\\)`); } From 8355e02e91e85f032a240bc67e5ddeb95aeb2412 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Sat, 10 May 2025 23:38:22 +0800 Subject: [PATCH 2/4] Avoid the background invisible when selecting text with background color --- apps/client/src/stylesheets/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index 544b6581b..cd8a4a2ff 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -1222,6 +1222,10 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu { background-color: inherit; } +::selection { + background-color: #3399FF70; +} + [data-bs-toggle="tooltip"]:not(.button-widget) span { padding-bottom: 0; border-bottom: 1px dotted; From 58e53fc8ced67c2eb59fb3e8bbcab2e2a68accf4 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Sun, 11 May 2025 00:09:15 +0800 Subject: [PATCH 3/4] add test case for multiple inline math expressions in imported Markdown --- apps/server/src/services/import/markdown.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/server/src/services/import/markdown.spec.ts b/apps/server/src/services/import/markdown.spec.ts index a2f9da5be..103c3fc6f 100644 --- a/apps/server/src/services/import/markdown.spec.ts +++ b/apps/server/src/services/import/markdown.spec.ts @@ -188,6 +188,12 @@ second line 2
Energy: \\(e=mc^{2}\\), Force: \\(F=ma\\).
`; + expect(markdownService.renderToHtml(input, "Title")).toStrictEqual(expected); + }); + it("converts display math expressions into Mathtex format", () => { const input = `$$\sqrt{x^{2}+1}$$`; const expected = /*html*/`\\[\sqrt{x^{2}+1}\\]
`; From dea8fa411f350b25d46bc8a0d65203d1fb6e47e7 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Mon, 12 May 2025 09:11:22 +0800 Subject: [PATCH 4/4] Revert "Avoid the background invisible when selecting text with background color" --- apps/client/src/stylesheets/style.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index cd8a4a2ff..544b6581b 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -1222,10 +1222,6 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu { background-color: inherit; } -::selection { - background-color: #3399FF70; -} - [data-bs-toggle="tooltip"]:not(.button-widget) span { padding-bottom: 0; border-bottom: 1px dotted;