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.
Syntax._get_syntax()currently callsconsole.render_lines(...)once per highlighted source line whenword_wrap=True, even whenline_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.