mirror of https://github.com/Textualize/rich.git
type fixes
This commit is contained in:
parent
96899fd400
commit
b584dd64db
|
@ -105,7 +105,6 @@ class Style:
|
|||
encircle: bool = None,
|
||||
overline: bool = None,
|
||||
link: str = None,
|
||||
link_id: str = None,
|
||||
):
|
||||
self._ansi: Optional[str] = None
|
||||
self._style_definition: Optional[str] = None
|
||||
|
@ -150,7 +149,7 @@ class Style:
|
|||
)
|
||||
)
|
||||
self._link = link
|
||||
self._link_id = (link_id or f"{time()}-{randint(0, 999999)}") if link else ""
|
||||
self._link_id = f"{time()}-{randint(0, 999999)}" if link else ""
|
||||
|
||||
bold = _Bit(0)
|
||||
dim = _Bit(1)
|
||||
|
|
|
@ -363,7 +363,8 @@ class Text(JupyterMixin):
|
|||
if style:
|
||||
start, end = get_span()
|
||||
match_style = style(plain[start:end]) if callable(style) else style
|
||||
append_span(_Span(start, end, match_style))
|
||||
if match_style is not None:
|
||||
append_span(_Span(start, end, match_style))
|
||||
|
||||
count += 1
|
||||
for name in match.groupdict().keys():
|
||||
|
|
Loading…
Reference in New Issue