Skip to content

(perf) Syntax word wrap without line numbers repeatedly renders each source line #4176

Description

@KRRT7

Syntax._get_syntax() currently calls console.render_lines(...) once per highlighted source line when word_wrap=True, even when line_numbers=False.

For syntax blocks without line numbers, continuation prefixes are not needed, so the selected highlighted lines can be joined and rendered/wrapped in one batch. This avoids repeatedly entering the generic console render pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions