mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
check if we're in colourless mode before passing back highlighted text.
pass context to check_mark so we can do the same there. Fixes rich.errors.MarkupError
This commit is contained in:
@@ -9,4 +9,6 @@ err = Console(stderr=True, style='bold red')
|
||||
|
||||
def highlight(ctx: typer.Context, text: str) -> str:
|
||||
"""Highlight text using the current context's style."""
|
||||
if ctx.obj['style'].name == 'no_colour':
|
||||
return text
|
||||
return f'[{ctx.obj["style"].highlight}]{text}[/{ctx.obj["style"].highlight}]'
|
||||
|
||||
Reference in New Issue
Block a user