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