mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
Add Iso8601Highlighter
Add ability to highlight date and time strings according to ISO8601 [1] [1] https://en.wikipedia.org/wiki/ISO_8601
This commit is contained in:
parent
aa7926c143
commit
2707a73435
6 changed files with 326 additions and 1 deletions
|
@ -4,6 +4,7 @@ Highlighting
|
|||
============
|
||||
|
||||
Rich can apply styles to patterns in text which you :meth:`~rich.console.Console.print` or :meth:`~rich.console.Console.log`. With the default settings, Rich will highlight things such as numbers, strings, collections, booleans, None, and a few more exotic patterns such as file paths, URLs and UUIDs.
|
||||
Additional non-default highlighter are available, such as :class:`~rich.highlighter.ISO8601Highlighter` to highlight date and time.
|
||||
|
||||
You can disable highlighting either by setting ``highlight=False`` on :meth:`~rich.console.Console.print` or :meth:`~rich.console.Console.log`, or by setting ``highlight=False`` on the :class:`~rich.console.Console` constructor which disables it everywhere. If you disable highlighting on the constructor, you can still selectively *enable* highlighting with ``highlight=True`` on print/log.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue