Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-10-05 13:39:25 +0300
committerJeff King <peff@peff.net>2022-10-05 16:27:57 +0300
commitd36dbcd63e7757b0b44add238fcf8514a1476440 (patch)
treeb3f57e9be9640f04d7c10339c47cbd7af1ee4ebb
parent7b4505689c67d6ae63a2df0f4b56ba9e68a3324a (diff)
run rubocop --autocorrect --only Style/WhileUntilModifier
-rw-r--r--lib/tasks/index.rake8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/tasks/index.rake b/lib/tasks/index.rake
index 6665c4ce..cfb6cd37 100644
--- a/lib/tasks/index.rake
+++ b/lib/tasks/index.rake
@@ -103,9 +103,7 @@ def index_l10n_doc(filter_tags, doc_list, get_content)
text = $1.tr("^A-Za-z0-9-", "")
anchor = "#{path}-#{text}"
# handle anchor collisions by appending -1
- while ids.include?(anchor)
- anchor += "-1"
- end
+ anchor += "-1" while ids.include?(anchor)
ids.add(anchor)
"<dt class=\"hdlist1\" id=\"#{anchor}\"> <a class=\"anchor\" href=\"##{anchor}\"></a>#{$1} </dt>"
@@ -279,9 +277,7 @@ def index_doc(filter_tags, doc_list, get_content)
text = $1.tr("^A-Za-z0-9-", "")
anchor = "#{path}-#{text}"
# handle anchor collisions by appending -1
- while ids.include?(anchor)
- anchor += "-1"
- end
+ anchor += "-1" while ids.include?(anchor)
ids.add(anchor)
"<dt class=\"hdlist1\" id=\"#{anchor}\"> <a class=\"anchor\" href=\"##{anchor}\"></a>#{$1} </dt>"
end