From f540b003f4448fd4b1c399e1567bc5d632ab5b9d Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Thu, 27 Apr 2023 15:05:42 +0100 Subject: [PATCH] fix superfluous italics --- CHANGELOG.md | 6 ++++++ rich/syntax.py | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21386b2a..210b1565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [13.3.5] - 2023-04-27 + +### Fixed + +- Fixed italic indent guides in SVG ouput + ## [13.3.4] - 2023-04-12 ### Fixed diff --git a/rich/syntax.py b/rich/syntax.py index cc0660c2..ac669b83 100644 --- a/rich/syntax.py +++ b/rich/syntax.py @@ -590,7 +590,6 @@ class Syntax(JupyterMixin): def __rich_measure__( self, console: "Console", options: "ConsoleOptions" ) -> "Measurement": - _, right, _, left = Padding.unpack(self.padding) padding = left + right if self.code_width is not None: @@ -688,7 +687,7 @@ class Syntax(JupyterMixin): lines = ( Text("\n") .join(lines) - .with_indent_guides(self.tab_size, style=style) + .with_indent_guides(self.tab_size, style=style + Style(italic=False)) .split("\n", allow_blank=True) ) @@ -830,7 +829,6 @@ def _get_code_index_for_syntax_position( if __name__ == "__main__": # pragma: no cover - import argparse import sys