From 9cbf5ebac4bcf36ac4afa846952cbc9389151a18 Mon Sep 17 00:00:00 2001 From: milvasic Date: Wed, 11 Mar 2026 21:48:17 +0100 Subject: [PATCH] fix: forward node prop to Table component for AST-based index resolution\n\nThe table component mapping in MemoContent discarded the `node` prop\nfrom react-markdown, so `node.position.start.offset` was always\nundefined and the edit button never opened the table editor." --- web/src/components/MemoContent/index.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsx index 50ecfb8ca..90ecc48ab 100644 --- a/web/src/components/MemoContent/index.tsx +++ b/web/src/components/MemoContent/index.tsx @@ -124,10 +124,14 @@ const MemoContent = (props: MemoContentProps) => { // Code blocks pre: CodeBlock, // Tables - table: ({ children, ...props }) => {children}
, - thead: ({ children, ...props }) => {children}, - tbody: ({ children, ...props }) => {children}, - tr: ({ children, ...props }) => {children}, + table: ({ children, node, ...props }) => ( + + {children} +
+ ), + thead: ({ children }) => {children}, + tbody: ({ children }) => {children}, + tr: ({ children }) => {children}, th: ({ children, ...props }) => {children}, td: ({ children, ...props }) => {children}, }}