diff options
author | Jeff King <peff@peff.net> | 2022-10-05 17:05:55 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2022-10-05 17:05:55 +0300 |
commit | a1b093e6463d3eeaae38938a09dab2fe0007581e (patch) | |
tree | 98ab2f989664750efd6ea4062b31f824fe66a8e7 | |
parent | 46b4ff7df17188762d44b300990cac4ac646d96c (diff) |
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).
-rw-r--r-- | lib/tasks/index.rake | 2 |
1 files changed, 1 insertions, 1 deletions
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 |