🏡 index : ~doyle/dave.git

author Jordan Doyle <jordan@doyle.wf> 2017-08-08 11:34:27.0 +01:00:00
committer GitHub <noreply@github.com> 2017-08-08 11:34:27.0 +01:00:00
commit
42e8dfbb1878aaabfd81566d884ca7eaab85c385 [patch]
tree
77a854658661af0a6fe2e94d30fc0e7b6177d5c8
parent
7597eb878f9baf157b482aeb7135fc2fd63a08a6
download
42e8dfbb1878aaabfd81566d884ca7eaab85c385.tar.gz

Only bold if something was replaced



Diff

 dave/modules/sed.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dave/modules/sed.py b/dave/modules/sed.py
index 4479bbf..f406014 100644
--- a/dave/modules/sed.py
+++ a/dave/modules/sed.py
@@ -26,8 +26,8 @@

        try:
            # bold replacements
            toDisplay = re.sub(args[3], "\x02{}\x0F".format(args[5]), msg,
                             count=0 if 'g' in flags else 1, flags=f)
            toDisplay = re.sub(args[3], "\x02{}\x0F".format(args[5]) if args[5] else "",
                               msg, count=0 if 'g' in flags else 1, flags=f)
            toSave = re.sub(args[3], args[5], msg,
                            count=0 if 'g' in flags else 1, flags=f)
        except Exception as e: