diff options
author | Jeff King <peff@peff.net> | 2022-10-05 13:39:25 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2022-10-05 16:27:57 +0300 |
commit | d36dbcd63e7757b0b44add238fcf8514a1476440 (patch) | |
tree | b3f57e9be9640f04d7c10339c47cbd7af1ee4ebb | |
parent | 7b4505689c67d6ae63a2df0f4b56ba9e68a3324a (diff) |
run rubocop --autocorrect --only Style/WhileUntilModifier
-rw-r--r-- | lib/tasks/index.rake | 8 |
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 |