mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
enable console markup (#2122)
* enable console markup * changelog * snapshot
This commit is contained in:
16
tests/snapshot_tests/snapshot_apps/table_markup.py
Normal file
16
tests/snapshot_tests/snapshot_apps/table_markup.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Static
|
||||
|
||||
from rich.table import Table
|
||||
|
||||
|
||||
class TableStaticApp(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
table = Table("[i green]Foo", "Bar", "baz")
|
||||
table.add_row("Hello [bold magenta]World!", "[i]Italic", "[u]Underline")
|
||||
yield Static(table)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = TableStaticApp()
|
||||
app.run()
|
||||
Reference in New Issue
Block a user