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 enter transform condition with codebox + linebreak (#1432)

Seamus2dae1c20800c
diff --git a/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts b/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts
index 5403e5edfe..e44c72bcc2 100644
--- a/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts
+++ b/js/app/packages/core/component/LexicalMarkdown/plugins/markdown-shortcuts/markdownShortcutsPlugin.ts
@@ -64,6 +64,8 @@ function registerMarkdownShortcutsPlugins(
if (regExp.test(textContent)) {
const parent = node.getParent();
if (parent && $isParagraphNode(parent)) {
+ if (parent.getFirstChild() !== node) continue;
+
const match = textContent.match(regExp); // get the real match, since we care for the coercion here
if (match) {
if (transformer.type === 'multiline-element') {