Skip to content

Commit b828e90

Browse files
authored
Merge pull request #2657 from thedanbob/rails-8.1
Add rails 8.1
2 parents f119ba9 + 50cfa6d commit b828e90

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/docs/filters/rails/clean_html_guides.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ class CleanHtmlGuidesFilter < Filter
44
def call
55
return doc unless slug.start_with?('guides')
66

7-
at_css('#mainCol').prepend_child at_css('#feature .wrapper').children
8-
@doc = at_css('#mainCol')
7+
main_col = at_css('#mainCol') || at_css('#column-main')
8+
main_col.prepend_child at_css('#feature .wrapper').children
9+
@doc = main_col
910

1011
container = Nokogiri::XML::Node.new 'div', doc.document
1112
container['class'] = '_simple'

lib/docs/filters/rails/entries.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class EntriesFilter < Docs::Rdoc::EntriesFilter
4040

4141
def get_name
4242
if slug.start_with?('guides')
43-
name = at_css('#mainCol h2').content.strip
43+
name = (at_css('#mainCol h2') || at_css('#column-main h2')).content.strip
4444
name.remove! %r{\s\(.+\)\z}
4545
return name
4646
end

lib/docs/filters/rdoc/clean_html.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def other
6464
node['data-language'] = 'c' if node['class'] == 'c'
6565
node['data-language'] = 'ruby' if node['class'] && node['class'].include?('ruby')
6666
end
67+
68+
# Remove navigation breadcrumbs
69+
css('ol[role="navigation"]').remove
6770
end
6871
end
6972
end

0 commit comments

Comments
 (0)