mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-15 08:48:15 +00:00
Update rubocop to version 1.76.2 (#35070)
This commit is contained in:
parent
adf01b021c
commit
b1fe35d7d2
|
@ -1,6 +1,6 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
|
||||
# using RuboCop version 1.76.1.
|
||||
# using RuboCop version 1.76.2.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
|
|
|
@ -761,7 +761,7 @@ GEM
|
|||
rspec-mocks (~> 3.0)
|
||||
sidekiq (>= 5, < 9)
|
||||
rspec-support (3.13.3)
|
||||
rubocop (1.76.1)
|
||||
rubocop (1.76.2)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
|
@ -769,7 +769,7 @@ GEM
|
|||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 2.9.3, < 3.0)
|
||||
rubocop-ast (>= 1.45.0, < 2.0)
|
||||
rubocop-ast (>= 1.45.1, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 4.0)
|
||||
rubocop-ast (1.45.1)
|
||||
|
|
|
@ -46,12 +46,12 @@ class EmojiFormatter
|
|||
|
||||
if inside_shortname && text[i] == ':'
|
||||
inside_shortname = false
|
||||
shortcode = text[shortname_start_index + 1..i - 1]
|
||||
shortcode = text[(shortname_start_index + 1)..(i - 1)]
|
||||
char_after = text[i + 1]
|
||||
|
||||
next unless (char_after.nil? || !DISALLOWED_BOUNDING_REGEX.match?(char_after)) && (emoji = emoji_map[shortcode])
|
||||
|
||||
result << tree.document.create_text_node(text[last_index..shortname_start_index - 1]) if shortname_start_index.positive?
|
||||
result << tree.document.create_text_node(text[last_index..(shortname_start_index - 1)]) if shortname_start_index.positive?
|
||||
result << tree.document.fragment(tag_for_emoji(shortcode, emoji))
|
||||
|
||||
last_index = i + 1
|
||||
|
|
|
@ -58,7 +58,7 @@ class TextFormatter
|
|||
|
||||
prefix = url.match(URL_PREFIX_REGEX).to_s
|
||||
display_url = url[prefix.length, 30]
|
||||
suffix = url[prefix.length + 30..]
|
||||
suffix = url[(prefix.length + 30)..]
|
||||
cutoff = url[prefix.length..].length > 30
|
||||
|
||||
if suffix && suffix.length == 1 # revert truncation to account for ellipsis
|
||||
|
|
Loading…
Reference in New Issue
Block a user