mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-09 00:28:08 +03:00
Refactor to use Text.styled instead of Text.from_markup and escape
This is much more readable, and presumably more performant.
This commit is contained in:
parent
cfe4104b6f
commit
89dadbf4b1
@ -659,7 +659,10 @@ class NodeInfo(Container):
|
||||
qualname = message_class.__qualname__
|
||||
doc = inspect.getdoc(message_class) or '(No docstring)'
|
||||
return Text.assemble(
|
||||
Text.from_markup(f"[b]{escape(qualname)}[/b]\n[#808080]{escape(doc)}[/#808080]\n"),
|
||||
Text.styled(qualname, "bold"),
|
||||
"\n",
|
||||
Text.styled(doc, "#808080"),
|
||||
"\n",
|
||||
usage_info,
|
||||
"\n",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user