witchie/toot/tui/stubs/stub_text_embed.py
Daniel Schwarz 0f39b1087f Support to display a limited set of HTML tags
HTML tag support is aligned with Mastodon 4.2 supported tags.
This code introduces a soft dependency on the urwidgets library.
If urwidgets is not available, HTML tags are still supported,
but hyperlinks are not underlined using the OCS 8 terminal
feature (on supported terminals).
2023-09-22 21:32:19 -04:00

29 lines
399 B
Python

__all__ = ("parse_text", "TextEmbed")
import urwid
class TextEmbed(urwid.Text):
def get_text(
self,
):
return None
def render(self, size, focus):
return None
def set_text(self, markup):
pass
def set_wrap_mode(self, mode):
pass
def parse_text(
text,
patterns,
repl,
*repl_args,
**repl_kwargs,
):
return None