From 15e0b42f04beb397f4bc3da6ff32e26e758a26d2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Aug 2021 08:46:42 +0530 Subject: [PATCH] Make the regex for commenting settings more robust --- kittens/themes/collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/themes/collection.py b/kittens/themes/collection.py index b1d25afdd..362fe71fa 100644 --- a/kittens/themes/collection.py +++ b/kittens/themes/collection.py @@ -67,7 +67,7 @@ mark2_background mark3_foreground mark3_background '''.splitlines())) - pat = f'^({"|".join(color_conf_items)})' + pat = fr'^\s*({"|".join(color_conf_items)})\b' return re.sub(pat, r'# \1', nraw, flags=re.MULTILINE)