Skip to content

Internal quote pairs cause unexpected coloring? #32

Closed
@lillian27

Description

@lillian27

Nice module!

I've noticed the following odd behavior: when using rich.print with bbcode tags, if the string contains matching quotes the substring between the quotes is colored green.

from rich import print
# Contains a quote pair, Malley is printed in green
print("[bold]O'Malley's Bar[/bold]")

# Only one quote, prints as expected
print("[bold]O'Malleys Bar[/bold]")

I've tried this with a few different tags, swapping the internal quote types, and using Console.print() but all show the same behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions