Closed leonard-IMBERT closed 1 year ago
Ok, from what I see, when reaching this line (end of parsing) It tries to parse the clear token /~
but because /~
is not in the CLEARERS object, it will raise a MarkupSyntaxError
appending /~
to the list of unknown aliases making it displayed
The one line problem come from the height being too small, my bad. But the PlainToken
just before the link is not displayed. If some style is applied to it, it appear
import pytermgui as ptg
with ptg.WindowManager() as manager:
windowBody = ptg.Window(
"""
Hello there
This is just some test with an
[~https://google.com]hyperlink[/~] just right here
This is some other text with an other example [~https://example.com]here[/~]
And some other test.
""",
height=50,
width=80,
)
import pytermgui as ptg
with ptg.WindowManager() as manager:
windowBody = ptg.Window(
"""
Hello there
[bold]This is just some test with an[/]
[~https://google.com]hyperlink[/~] just right here
This is some other text with an other example [~https://example.com]here[/~]
And some other test.
""",
height=50,
width=80,
)
manager.add(windowBody)
The root of the problem seem to come from tokenize_ansi
(called from Label.print() which call ptg.break_line
)
Fixed by #108 (thanks!)
Describe the bug
Hyperlink are not correctly displayed
To Reproduce
Here is a reproducible example:
Expected behavior
Expecting to have a window with
displayed
Screenshots
Here is the result I got
System information
Possible cause It seems that the hyperlink tag are not correctly rendered by ptg
Possible solution
The issue should be around here from what I understand