From b5913fd2a27f7397aa67db5befafd43440f660a3 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sun, 22 Nov 2026 08:22:50 +0100 Subject: [PATCH] chore(app): match the vendored Markdown web block renderer source to its build The package patch changed lib/module/web/renderers/BlockRenderers.js (the renderers.codeBlock override and the zoom-in cursor on images) but not src/web/renderers/BlockRenderers.tsx. The app runs lib, so behavior does not change. Port both changes into src so src stays the source of lib. --- .../src/web/renderers/BlockRenderers.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/react-native-enriched-markdown/src/web/renderers/BlockRenderers.tsx b/packages/react-native-enriched-markdown/src/web/renderers/BlockRenderers.tsx index 7ebd7dab70..e0092ecbb3 100644 --- a/packages/react-native-enriched-markdown/src/web/renderers/BlockRenderers.tsx +++ b/packages/react-native-enriched-markdown/src/web/renderers/BlockRenderers.tsx @@ -90,12 +90,28 @@ function AdmonitionRenderer({ } function CodeBlockRenderer({ + capabilities, node, styles, renderChildren, callbacks, }: RendererProps) { const language = node.attributes?.language; + const CustomCodeBlock = capabilities.renderers?.codeBlock; + if (CustomCodeBlock) { + // The custom renderer owns the block's look; the library keeps its spacing, + // including the zeroed trailing margin of the last block. + return ( +
+ +
+ ); + } const label = language ? `Code block: ${language}` : 'Code block'; if (callbacks.onCodeBlockPress == null) { @@ -196,7 +212,7 @@ function ImageRenderer({ node, styles, parentType, callbacks }: RendererProps) { src={url} alt={alt} title={title} - style={imgStyle} + style={{ ...imgStyle, cursor: 'zoom-in' }} role="button" tabIndex={0} aria-label={alt}