about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-09 14:38:04 +0000
committerbors <bors@rust-lang.org>2024-05-09 14:38:04 +0000
commit9abaf91a68e5cb98fe28341f060e58b0a76b3499 (patch)
tree31ebaf3b12e692f40367d5a1939ebf5ab5ab0883
parent30b3b73aa67f686db7370e490bf830ab2ddca8d6 (diff)
parent1c9bf96b96f17ac177efaec22841e2ef3addd14c (diff)
downloadrust-9abaf91a68e5cb98fe28341f060e58b0a76b3499.tar.gz
rust-9abaf91a68e5cb98fe28341f060e58b0a76b3499.zip
Auto merge of #12719 - roddyrap:fix-website-dash-replace-12718, r=xFrednet
Fix website dash replacement

Fixes: #12718
changelog: Made clippy lints website search replace all occurrences of dashes with underscores instead of only the first one. This is in order to allow the user to search for lints with more than two words using dahses.
-rw-r--r--util/gh-pages/script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/gh-pages/script.js b/util/gh-pages/script.js
index c63edd5bf70..7fd779fe9a4 100644
--- a/util/gh-pages/script.js
+++ b/util/gh-pages/script.js
@@ -406,7 +406,7 @@
                 }
 
                 // Search by id
-                if (lint.id.indexOf(searchStr.replace("-", "_")) !== -1) {
+                if (lint.id.indexOf(searchStr.replaceAll("-", "_")) !== -1) {
                     return true;
                 }