fix for right align

This commit is contained in:
Will McGugan 2020-05-22 16:56:21 +01:00
parent be0bd97404
commit a3b09979d5
4 changed files with 9 additions and 2 deletions

View File

@ -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).
## [1.2.2] - 2020-05-22
### Fixed
- Issue with right aligned wrapped text adding extra spaces
## [1.2.1] - 2020-05-22
### Fixed

View File

@ -2,7 +2,7 @@
name = "rich"
homepage = "https://github.com/willmcgugan/rich"
documentation = "https://rich.readthedocs.io/en/latest/"
version = "1.2.1"
version = "1.2.2"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
authors = ["Will McGugan <willmcgugan@gmail.com>"]
license = "MIT"

View File

@ -120,6 +120,7 @@ class Lines:
line.pad_right(width - cell_len(line.plain))
elif align == "right":
for line in self._lines:
line.rstrip()
line.pad_left(width - cell_len(line.plain))
elif align == "full":
for line_index, line in enumerate(self._lines):

File diff suppressed because one or more lines are too long