Josh Rosario 8 달 전
부모
커밋
a49e15048b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      main.py

+ 1 - 0
main.py

@@ -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