Skip to content

Commit a4c09cf

Browse files
committed
RuboCop: Style/WordArray
1 parent 56a2cd0 commit a4c09cf

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/webmention/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Webmention
44
# @api private
55
class Parser
6-
URI_REGEXP = URI::DEFAULT_PARSER.make_regexp(%w[http https]).freeze
6+
URI_REGEXP = URI::DEFAULT_PARSER.make_regexp(["http", "https"]).freeze
77

88
public_constant :URI_REGEXP
99

lib/webmention/parsers/html_parser.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class HtmlParser < Parser
99
Client.register_parser(self)
1010

1111
HTML_ATTRIBUTES_MAP = {
12-
"cite" => %w[blockquote del ins q],
13-
"data" => %w[object],
14-
"href" => %w[a area],
15-
"poster" => %w[video],
16-
"src" => %w[audio embed img source track video],
17-
"srcset" => %w[img source],
12+
"cite" => ["blockquote", "del", "ins", "q"],
13+
"data" => ["object"],
14+
"href" => ["a", "area"],
15+
"poster" => ["video"],
16+
"src" => ["audio", "embed", "img", "source", "track", "video"],
17+
"srcset" => ["img", "source"],
1818
}.freeze
1919

2020
CSS_SELECTORS_ARRAY = HTML_ATTRIBUTES_MAP.flat_map do |attribute, names|

lib/webmention/parsers/plaintext_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class PlaintextParser < Parser
1010

1111
# @return [Array<String>] An array of absolute URLs.
1212
def results
13-
@results ||= URI::DEFAULT_PARSER.extract(response_body, %w[http https])
13+
@results ||= URI::DEFAULT_PARSER.extract(response_body, ["http", "https"])
1414
end
1515
end
1616
end

0 commit comments

Comments
 (0)