Remove __name__ == "__main__" in markdown.py

This commit is contained in:
Joakim Hellsén 2023-01-28 21:16:23 +01:00
commit ee6eac721b
No known key found for this signature in database
GPG key ID: C889E6DC5EDBB36D

View file

@ -55,14 +55,3 @@ def convert_html_to_md(html: str) -> str:
# Remove all leading and trailing whitespace
soup_text: str = soup.text
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))