Skip to content

Commit d8eb568

Browse files
committed
fix warnings
1 parent d6df6b5 commit d8eb568

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/docs/filters/react/clean_html_react_dev.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def call
66

77
# Remove breadcrumbs before h1
88
css('h1').each do |node|
9-
if (node.previous)
9+
if node.previous
1010
node.previous.remove
1111
end
1212
end

lib/docs/filters/react/entries_react_dev.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ class React
33
class EntriesReactDevFilter < Docs::EntriesFilter
44
def get_name
55
name = at_css('article h1')&.content
6-
return update_canary_copy(name)
6+
7+
update_canary_copy(name)
78
end
89

910
def get_type
@@ -17,12 +18,14 @@ def get_type
1718
&.concat(": ")
1819
is_learn_page = path.start_with?('learn/') || slug == 'learn'
1920
prefix = is_learn_page ? 'Learn: ' : top_category || ''
20-
return update_canary_copy(prefix + (category || 'Miscellaneous'))
21+
22+
update_canary_copy(prefix + (category || 'Miscellaneous'))
2123
end
2224

2325
def update_canary_copy(string)
2426
canary_copy = '- This feature is available in the latest Canary'
25-
return string.sub(canary_copy, ' (Canary)')
27+
28+
string.sub(canary_copy, ' (Canary)')
2629
end
2730

2831
def additional_entries
@@ -34,7 +37,8 @@ def additional_entries
3437
next if excluded.include?(name.downcase)
3538
entries << [name, node['id'], type]
3639
end
37-
return entries
40+
41+
entries
3842
end
3943
end
4044
end

0 commit comments

Comments
 (0)