From cde61a1c4fbfd356d471bf52bb7762f3084d76e5 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sat, 9 Feb 2019 09:04:24 +1300 Subject: [PATCH] Use Regex to search for author --- script/check_contributors_md.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/check_contributors_md.rb b/script/check_contributors_md.rb index 44c54444c..9aa3fa290 100755 --- a/script/check_contributors_md.rb +++ b/script/check_contributors_md.rb @@ -29,7 +29,10 @@ Please set it using end end -unless File.read('CONTRIBUTORS.md').include? author +# Escape chars in name, and make case insensitive +author_to_search_for = Regexp.new(Regexp.escape(author), Regexp::IGNORECASE) + +unless File.read('CONTRIBUTORS.md').match?(author_to_search_for) abort %( Thanks for your contribution, #{author}! Please add your name and GitHub handle to the file CONTRIBUTORS.md,