-
Notifications
You must be signed in to change notification settings - Fork 815
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into less-busy-suggest
- Loading branch information
Showing
12 changed files
with
454 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.containers import Horizontal | ||
from textual.widgets import Markdown | ||
|
||
MARKDOWN = ( | ||
"""\ | ||
X X | ||
X X | ||
X\tX | ||
X\t\tX | ||
""", | ||
"""\ | ||
X \tX | ||
X \t \tX | ||
""", | ||
"""\ | ||
[X X X\tX\t\tX \t \tX](https://example.com/) | ||
_X X X\tX\t\tX \t \tX_ | ||
**X X X\tX\t\tX \t \tX** | ||
~~X X X\tX\t\tX \t \tX~~ | ||
""" | ||
) | ||
|
||
class MarkdownSpaceApp(App[None]): | ||
|
||
CSS = """ | ||
Markdown { | ||
margin-left: 0; | ||
border-left: solid red; | ||
width: 1fr; | ||
height: 1fr; | ||
} | ||
.code { | ||
height: 2fr; | ||
border-top: solid red; | ||
} | ||
""" | ||
|
||
def compose(self) -> ComposeResult: | ||
with Horizontal(): | ||
for document in MARKDOWN: | ||
yield Markdown(document) | ||
yield Markdown("""```python | ||
# Two spaces: see? | ||
class Foo: | ||
'''This is a doc string.''' | ||
some_code(1, 2, 3, 4) | ||
``` | ||
""", classes="code") | ||
|
||
if __name__ == "__main__": | ||
MarkdownSpaceApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.widgets import Welcome | ||
|
||
class WelcomeApp(App[None]): | ||
|
||
def compose(self) -> ComposeResult: | ||
yield Welcome() | ||
|
||
if __name__ == "__main__": | ||
WelcomeApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters