From a1b093e6463d3eeaae38938a09dab2fe0007581e Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 5 Oct 2022 10:05:55 -0400 Subject: index_doc(): check command-list.txt with string equality There's no need to use a regex; we'll always see the full string. This is more accurate, and appeases rubocop (which suggested .includes() for equivalent behavior, but it isn't aware of the possible simplification). --- lib/tasks/index.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/index.rake b/lib/tasks/index.rake index 47e35b43..f9b5d727 100644 --- a/lib/tasks/index.rake +++ b/lib/tasks/index.rake @@ -206,7 +206,7 @@ def index_doc(filter_tags, doc_list, get_content) # generate command-list content generated = {} - cmd = tag_files.detect { |f| f.first =~ /command-list\.txt/ } + cmd = tag_files.detect { |f| f.first == "command-list.txt" } if cmd cmd_list = get_content -- cgit v1.2.3