From 68e1b6386db241d49f7713dae4ba3b59c0d30ba6 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 22 Oct 2024 15:37:12 +0100 Subject: [PATCH] fix regex --- CHANGELOG.md | 7 +++++++ rich/cells.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3e1a20c..8e4a24bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ 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.9.3] - 2024-10-22 + +### Fixed + +- Fixed broken regex that may have resulted in poor performance. + ## [13.9.2] - 2024-10-04 ### Fixed diff --git a/rich/cells.py b/rich/cells.py index f85f928f..93ecf6ab 100644 --- a/rich/cells.py +++ b/rich/cells.py @@ -7,7 +7,7 @@ from typing import Callable from ._cell_widths import CELL_WIDTHS # Regex to match sequence of the most common character ranges -_is_single_cell_widths = re.compile("^[\u0020-\u006f\u00a0\u02ff\u0370-\u0482]*$").match +_is_single_cell_widths = re.compile("^[\u0020-\u007f\u00a0\u02ff\u0370-\u0482]*$").match @lru_cache(4096)