mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
- Update all TipTap packages from v3.7.2 to v3.9.0 including extensions and patch files - Fix task list alignment and nested checked item styling to prevent inheritance issues - Remove Tab key handler from code block extension and add patch-package dependency
31 lines
1.1 KiB
Diff
Vendored
31 lines
1.1 KiB
Diff
Vendored
diff --git a/dist/index.js b/dist/index.js
|
|
index 09b04baf28c18d8ee20e6d0644329a830915e893..f2b3e8df251c3f56074937dc0c6e658930d5303b 100644
|
|
--- a/dist/index.js
|
|
+++ b/dist/index.js
|
|
@@ -558,14 +558,24 @@ var MarkdownManager = class {
|
|
nextNode,
|
|
this.markSetsEqual.bind(this)
|
|
);
|
|
+
|
|
+ // Collect all closing marks with their markdown syntax
|
|
+ const closingMarks = [];
|
|
marksToCloseAtEnd.forEach((markType) => {
|
|
const mark = activeMarks.get(markType);
|
|
const closeMarkdown = this.getMarkClosing(markType, mark);
|
|
if (closeMarkdown) {
|
|
- textContent += closeMarkdown;
|
|
+ closingMarks.push(closeMarkdown);
|
|
}
|
|
activeMarks.delete(markType);
|
|
});
|
|
+
|
|
+ // Reverse the closing marks to match opening order (LIFO)
|
|
+ // For example: if we opened as *~~, we should close as ~~*
|
|
+ closingMarks.reverse().forEach((closeMarkdown) => {
|
|
+ textContent += closeMarkdown;
|
|
+ });
|
|
+
|
|
result.push(textContent);
|
|
} else {
|
|
const marksToReopen = new Map(activeMarks);
|