Skip to content

[BUG] highlight keyword does not affect padded content #1404

@rybesh

Description

@rybesh

Describe the bug

The highlight keyword does not affect padded text, either to turn highlighting off or to turn it on.

To Reproduce

from rich.console import Console
from rich.padding import Padding
console = Console(highlight=True)
console.print(Padding("1 2 3 4", (1,1)), highlight=False)

Expected output: numbers are not highlighted.
Actual output: numbers are highlighted.

from rich.console import Console
from rich.padding import Padding
console = Console(highlight=False)
console.print(Padding("1 2 3 4", (1,1)), highlight=True)

Expected output: numbers are highlighted.
Actual output: numbers are not highlighted.

Platform

macOS 11.5.1
iTerm2 3.4.8
rich==10.7.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions