summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xgnbug10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnbug b/gnbug
index eb8bbe5..d353cf0 100755
--- a/gnbug
+++ b/gnbug
@@ -334,15 +334,17 @@ List recent updates.
 (define (print-issue issue-number issue)
   "Print ISSUE with number ISSUE-NUMBER."
   (display (magenta (issue-title issue)))
-  ;; Highlight keywords containing "bug" or "critical" in red. Else,
-  ;; highlight in blue.
+  ;; Highlight keywords containing "bug" or "critical" as whole words
+  ;; in red. Else, highlight in blue.
   (unless (null? (issue-keywords issue))
     (display " ")
     (display (string-join
               (map (lambda (keyword)
                      ((cond
-                       ((any (cut string-contains keyword <>)
-                             (list "bug" "critical"))
+                       ((not (null? (lset-intersection
+                                     string=?
+                                     (string-split keyword #\space)
+                                     (list "bug" "critical"))))
                         red-background)
                        (else blue-background))
                       (string-append " " keyword " ")))