Remove __name__ == "__main__" in markdown.py

This commit is contained in:
2023-01-28 21:16:23 +01:00
parent 07aeea44c2
commit ee6eac721b

View File

@ -55,14 +55,3 @@ def convert_html_to_md(html: str) -> str:
# Remove all leading and trailing whitespace # Remove all leading and trailing whitespace
soup_text: str = soup.text soup_text: str = soup.text
return soup_text.strip() return soup_text.strip()
# Test the function
if __name__ == "__main__":
html: str = """
<p><b>bold</b> <i>italic</i> <a href="https://example.com">link</a> <code>code</code> <s>strikethrough</s></p>
<blockquote>blockquote</blockquote>
<pre><code>pre code</code></pre>
<strong>strong</strong>
"""
print(convert_html_to_md(html))