Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(md): fix single line util for single item lists (#661)

Seamusd5b5b883a58b
diff --git a/js/app/packages/core/component/LexicalMarkdown/utils.ts b/js/app/packages/core/component/LexicalMarkdown/utils.ts
index 2cec295535..86d7032158 100644
--- a/js/app/packages/core/component/LexicalMarkdown/utils.ts
+++ b/js/app/packages/core/component/LexicalMarkdown/utils.ts
@@ -1191,6 +1191,7 @@ function takeInlineUntilLineBreak(parent: ElementNode): LexicalNode[] {
}
return out;
}
+
const $singleLineNode = (node: ElementNode): ElementNode | null => {
if ($isParagraphNode(node)) {
const inline = takeInlineUntilLineBreak(node);
@@ -1207,7 +1208,7 @@ const $singleLineNode = (node: ElementNode): ElementNode | null => {
for (const item of items) {
if (!$isListItemNode(item)) continue;
- const inline = takeInlineUntilLineBreak(node);
+ const inline = takeInlineUntilLineBreak(item);
if (!inline.length) continue;
item.clear();