From 11bc1b100c321da1c40247578f52e23dcf0a03fd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Apr 2022 19:48:09 +0530 Subject: [PATCH] Handle <> inside :ref: on the CLI --- kitty/cli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kitty/cli.py b/kitty/cli.py index 53c3336dc..cbf6af831 100644 --- a/kitty/cli.py +++ b/kitty/cli.py @@ -149,6 +149,11 @@ def doc(x: str) -> str: return website_url(x) +@role +def ref(x: str) -> str: + return re.sub(r'\s*<.+?>', '', x) + + OptionSpecSeq = List[Union[str, OptionDict]]