cherry-studio/.yarn/patches/@tiptap-markdown-npm-3.9.0-16e287adb3.patch
suyao 24563b524c
Upgrade TipTap dependencies to v3.9.0 and fix task list styling
- 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
2025-10-29 02:38:51 +08:00

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);