social media crossposting tool. 3rd time's the charm
mastodon misskey crossposting bluesky

fuuuuck

zenfyr.dev d39c6bae 03b00208

verified
Changed files
+6
mastodon
+6
mastodon/markeddown.py
···
+
import re
from html.parser import HTMLParser
+
+
WHITESPACE = re.compile(r'[\r\n\t]+')
class HTMLToMarkdownParser(HTMLParser):
def __init__(self) -> None:
···
elif tag in ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']:
self.markdown.append('\n')
+
+
def handle_data(self, data):
+
self.markdown.append(data)
def reset(self):
"""Reset the parser state for reuse."""