Skip to content

Commit

Permalink
Change regex string to less permissive one
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed Nov 20, 2022
1 parent 9ebf24f commit 67f5ee4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cleo/ui/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,11 @@ def _render_cell(self, row: Row, column: int, cell_format: str) -> str:
pad = style.pad
if isinstance(cell, TableCell) and isinstance(cell.style, TableCellStyle):
is_not_styled_by_tag = not re.match(
r"^<(\w+|(\w+=[\w,]+;?)*)>.+</(\w+|(\w+=\w+;?)*)?>$", str(cell)
(
r"^<(\w+|((?:fg|bg|options)=[\w,]+;?)+)>"
r".+<\/(\w+|((?:fg|bg|options)=[\w,]+;?)+)?>$"
),
str(cell),
)
if is_not_styled_by_tag:
cell_format = (
Expand Down

0 comments on commit 67f5ee4

Please sign in to comment.