mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-07 04:14:19 +00:00
nimgrep: fixes the -w option
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user