From 697c2b2a58cb2f03fd6884cd431ca4b5c6a5efac Mon Sep 17 00:00:00 2001 From: unclecode Date: Sat, 7 Mar 2026 07:06:41 +0000 Subject: [PATCH] fix: add newline before opening code fence in html2text (#462) From PR #462 by @jtanningbed --- crawl4ai/html2text/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl4ai/html2text/__init__.py b/crawl4ai/html2text/__init__.py index 04d3d16e..9f241bac 100644 --- a/crawl4ai/html2text/__init__.py +++ b/crawl4ai/html2text/__init__.py @@ -1146,7 +1146,7 @@ class CustomHTML2Text(HTML2Text): # Handle pre tags if tag == "pre": if start: - self.o("```\n") # Markdown code block start + self.o("\n```\n") # Markdown code block start self.inside_pre = True else: self.o("\n```\n") # Markdown code block end