|
@@ -44,6 +44,7 @@ def extract_markdown_from_conversation(conversation: BeautifulSoup) -> str:
|
|
|
for element in conversation.children:
|
|
for element in conversation.children:
|
|
|
if isinstance(element, NavigableString):
|
|
if isinstance(element, NavigableString):
|
|
|
text = element.strip().replace("\n", " \n") # Preserve single spacing
|
|
text = element.strip().replace("\n", " \n") # Preserve single spacing
|
|
|
|
|
+ text = text.replace("<", "\<").replace(">", "\>") # Escape HTML tags that aren't in Code blocks
|
|
|
if text:
|
|
if text:
|
|
|
md_lines.append(text)
|
|
md_lines.append(text)
|
|
|
continue
|
|
continue
|