From 27199268707da9b522fe9008a7730f5ae4c30930 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 3 Jul 2019 10:45:37 +0530 Subject: [PATCH] Add some documentation on how to get regexes in the hints kitten to match over multiple lines. --- kittens/hints/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kittens/hints/main.py b/kittens/hints/main.py index f4c1ec037..f2d57f17f 100644 --- a/kittens/hints/main.py +++ b/kittens/hints/main.py @@ -350,7 +350,9 @@ def run(args, text): The regular expression to use when :option:`kitty +kitten hints --type`=regex. If you specify a group in the regular expression only the group will be matched. This allow you to match text ignoring a prefix/suffix, as -needed. The default expression matches lines. +needed. The default expression matches lines. To match text over +multiple lines you should prefix the regular expression with :code:`(?ms)`, +which turns on MULTILINE and DOTALL modes for the regex engine. --url-prefixes