Skip to content

Commit 84cea9a

Browse files
authored
Merge pull request #600 from jonathanhefner/fix-comment-regex
Fix comment_lines regexp
2 parents ef8a468 + ddd5251 commit 84cea9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/actions/file_manipulation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def uncomment_lines(path, flag, *args)
307307
def comment_lines(path, flag, *args)
308308
flag = flag.respond_to?(:source) ? flag.source : flag
309309

310-
gsub_file(path, /^(\s*)([^#|\n]*#{flag})/, '\1# \2', *args)
310+
gsub_file(path, /^(\s*)([^#\n]*#{flag})/, '\1# \2', *args)
311311
end
312312

313313
# Removes a file at the given location.

0 commit comments

Comments
 (0)