Skip to content

[BUG] ConsoleOptions is missing an emoji field #4028

@kmvanbrunt

Description

@kmvanbrunt

Describe the bug
When printing a complex renderable like a Table, passing emoji=False to console.print() does not disable emoji parsing within the table cells if the Console was initialized with emoji=True (the default).

This appears to be because ConsoleOptions does not include an emoji field, and Console.render() does not propagate the emoji preference to render_str().

Here is code to reproduce the bug.

from rich.console import Console
from rich.table import Table

# Create Console with markup and emoji enabled
console = Console(markup=True, emoji=True)
t = Table(show_header=False)
t.add_row("[blue]some text[/blue]", ":1234:")

print("Normal print() shows markup and emoji rendering")
console.print(t)

# Attempt to override markup and emoji when printing a Table
print("Print overrides only work for markup and the emoji still renders")
console.print(t, markup=False, emoji=False)

Here is a screenshot of the results.

Image

Platform
rich==14.3.3
Python 3.11.2
Debian 12.13

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