From 5950bbe8a1d54dca9969d58bf6ed598c125c923e Mon Sep 17 00:00:00 2001 From: isaac <> Date: Fri, 29 May 2026 15:47:37 +0200 Subject: [PATCH] Fix code --- submodules/BrowserUI/Sources/InstantPageToMarkdown.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/submodules/BrowserUI/Sources/InstantPageToMarkdown.swift b/submodules/BrowserUI/Sources/InstantPageToMarkdown.swift index 09f48bc391..93372599f7 100644 --- a/submodules/BrowserUI/Sources/InstantPageToMarkdown.swift +++ b/submodules/BrowserUI/Sources/InstantPageToMarkdown.swift @@ -38,7 +38,10 @@ private func markdownString(from block: InstantPageBlock) -> String? { return rendered.isEmpty ? nil : escapeLeadingBlockMarker(rendered) case let .preformatted(text, language): let language = language ?? "" - return "```\(language)\n\(markdownInline(from: text))\n```" + // Code-fence body is raw text: the fences supply the code formatting, so do NOT run it + // through markdownInline (which re-wraps `.fixed` content in backticks and escapes markdown + // special chars). Use plainText to emit the literal source. + return "```\(language)\n\(text.plainText)\n```" case let .blockQuote(blocks, _): return markdownBlockQuoteBlocks(blocks) case let .pullQuote(text, _):