Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Nested color tags not working if adjoint #1334

Closed
tkmikan opened this issue Jul 9, 2021 · 0 comments · Fixed by #1335
Closed

[BUG] Nested color tags not working if adjoint #1334

tkmikan opened this issue Jul 9, 2021 · 0 comments · Fixed by #1335
Labels
bug Something isn't working

Comments

@tkmikan
Copy link

tkmikan commented Jul 9, 2021

Describe the bug
For nested bbcode tags, if two open tags of colors are adjoint, the latter one does not work.

To Reproduce

from rich.console import Console
console = Console()
print(list(console.render('[red][blue]this should be blue[/blue]red here[/red]')))

Expection: [Segment('this should be blue', Style.parse("blue")), Segment('red here', Style.parse("red")), Segment('\n', None)]
Actual: [Segment('this should be blue', Style.parse("red")), Segment('red here', Style.parse("red")), Segment('\n', None)]

Things work if a space is inserted between the open tags, or if either tag is not a color tag,

Platform
Platform: Linux and Mac
I belive it is not a platform specific issue.

@willmcgugan willmcgugan added bug Something isn't working and removed Needs triage labels Jul 9, 2021
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jul 13, 2021
10.6.0:

Deprecated

Added deprecation warning for tabulate_mapping which will be removed in v11.0.0

Added

Added precision argument to filesize.decimal
Added separator argument to filesize.decimal
Added _rich_traceback_guard to Traceback
Added emoji_variant to Console
Added -emoji and -text variant selectors to emoji code

Fixed

Fixed issue with adjoining color tags Textualize/rich#1334

Changed

Changed Console.size to use unproxied stdin and stdout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants