Python tool for converting files and office documents to Markdown.
remove leading and trailing \n for HtmlConverter (#262)
ZeyuTeng967bea2672a05f
diff --git a/src/markitdown/_markitdown.py b/src/markitdown/_markitdown.pyindex ae6a7b4f..6f405478 100644--- a/src/markitdown/_markitdown.py+++ b/src/markitdown/_markitdown.py@@ -236,6 +236,9 @@ class HtmlConverter(DocumentConverter):assert isinstance(webpage_text, str)+ # remove leading and trailing \n+ webpage_text = webpage_text.strip()+return DocumentConverterResult(title=None if soup.title is None else soup.title.string,text_content=webpage_text,