From 529134a83ffb7f635887addb83980b0bc9e056f7 Mon Sep 17 00:00:00 2001 From: Arthur-Gallez <71878314+Arthur-Gallez@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:10:18 +0200 Subject: [PATCH] fix: icon dispay in callout with codeblocks (#567) Fix #543 Adding a condition to not ignore callouts containing codeblocks in the text processing of markdown. --- src/editor/markdown-processors/icon-in-text.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor/markdown-processors/icon-in-text.ts b/src/editor/markdown-processors/icon-in-text.ts index 337c4594..0bdeeb53 100644 --- a/src/editor/markdown-processors/icon-in-text.ts +++ b/src/editor/markdown-processors/icon-in-text.ts @@ -81,7 +81,8 @@ export const processIconInTextMarkdown = ( ) => { // Ignore if codeblock const codeElement = element.querySelector('pre > code'); - if (codeElement) { + const callOut = element.querySelector('.callout'); + if (codeElement && !callOut) { return; }