Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def random_name_generator() -> str:

SIMPLE_EXAMPLE = "This is a simple example of long text without any decoration. " * 5
MARKUP_EXAMPLE = "This is a simple example of long text with [bold]bold[/bold] and [italic]italic[/italic]."
LINK_EXAMPLE = "This is a [blue][link=https://supermegalonglink-actually-really-long-link-that-should-be-wrapped-but-very-long.com?random_param=1234567890&random_param2=1234567890]https://supermegalonglink-actually-really-long-link-that-should-be-wrapped-but-very-long.com?random_param=1234567890&random_param2=1234567890[/link][/blue]"

for style in [TaggedStyle(tag_width=7), FancyStyle()]:
theme = RichToolkitTheme(
Expand Down Expand Up @@ -40,6 +41,10 @@ def random_name_generator() -> str:

app.print_line()

app.print(LINK_EXAMPLE)

app.print_line()

rich.print("---------------------------")

print("RICH EXAMPLES")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "rich-toolkit"
version = "0.14.5"
version = "0.14.6"
description = "Rich toolkit for building command-line applications"
readme = "README.md"
license = "MIT"
Expand Down
3 changes: 2 additions & 1 deletion src/rich_toolkit/styles/tagged.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def _tag_element(
) -> RenderableType:
table = Table.grid(
# TODO: why do we add 2? :D we probably did this in the previous version
Column(width=self.tag_width + 2),
Column(width=self.tag_width + 2, no_wrap=True),
Column(no_wrap=False, overflow="fold"),
padding=(0, 0, 0, 0),
collapse_padding=True,
pad_edge=False,
Expand Down
Loading