summary refs log tree commit diff stats
path: root/tools/nimgrep.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nimgrep.nim')
-rw-r--r--tools/nimgrep.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/nimgrep.nim b/tools/nimgrep.nim
index a5d29f13f..e79b32377 100644
--- a/tools/nimgrep.nim
+++ b/tools/nimgrep.nim
@@ -342,7 +342,7 @@ else:
     if optIgnoreStyle in options:
       pattern = styleInsensitive(pattern)
     if optWord in options:
-      pattern = r"\b (:?" & pattern & r") \b"
+      pattern = r"\b(:?" & pattern & r")\b"
     if {optIgnoreCase, optIgnoreStyle} * options != {}:
       reflags.incl reIgnoreCase
     let rep = re(pattern, reflags)