File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
# Remove breadcrumbs before h1
8
8
css ( 'h1' ) . each do |node |
9
- if ( node . previous )
9
+ if node . previous
10
10
node . previous . remove
11
11
end
12
12
end
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ class React
3
3
class EntriesReactDevFilter < Docs ::EntriesFilter
4
4
def get_name
5
5
name = at_css ( 'article h1' ) &.content
6
- return update_canary_copy ( name )
6
+
7
+ update_canary_copy ( name )
7
8
end
8
9
9
10
def get_type
@@ -17,12 +18,14 @@ def get_type
17
18
&.concat ( ": " )
18
19
is_learn_page = path . start_with? ( 'learn/' ) || slug == 'learn'
19
20
prefix = is_learn_page ? 'Learn: ' : top_category || ''
20
- return update_canary_copy ( prefix + ( category || 'Miscellaneous' ) )
21
+
22
+ update_canary_copy ( prefix + ( category || 'Miscellaneous' ) )
21
23
end
22
24
23
25
def update_canary_copy ( string )
24
26
canary_copy = '- This feature is available in the latest Canary'
25
- return string . sub ( canary_copy , ' (Canary)' )
27
+
28
+ string . sub ( canary_copy , ' (Canary)' )
26
29
end
27
30
28
31
def additional_entries
@@ -34,7 +37,8 @@ def additional_entries
34
37
next if excluded . include? ( name . downcase )
35
38
entries << [ name , node [ 'id' ] , type ]
36
39
end
37
- return entries
40
+
41
+ entries
38
42
end
39
43
end
40
44
end
You can’t perform that action at this time.
0 commit comments