Skip to content

Commit

Permalink
Merge pull request #5046 from xavierog/adjust-log-highlighter
Browse files Browse the repository at this point in the history
Adjust Log.highlighter type to allow for custom highlighters.
  • Loading branch information
willmcgugan authored Sep 24, 2024
2 parents c3e00ae + 6e7969f commit 12d1573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/widgets/_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING, Iterable, Optional, Sequence

from rich.cells import cell_len
from rich.highlighter import ReprHighlighter
from rich.highlighter import Highlighter, ReprHighlighter
from rich.segment import Segment
from rich.style import Style
from rich.text import Text
Expand Down Expand Up @@ -70,7 +70,7 @@ def __init__(
self._width = 0
self._updates = 0
self._render_line_cache: LRUCache[int, Strip] = LRUCache(1024)
self.highlighter = ReprHighlighter()
self.highlighter: Highlighter = ReprHighlighter()
"""The Rich Highlighter object to use, if `highlight=True`"""

@property
Expand Down

0 comments on commit 12d1573

Please sign in to comment.