File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ class EntriesFilter < Docs::EntriesFilter
4
4
5
5
def get_name
6
6
if slug . start_with? ( 'book' ) || slug . start_with? ( 'reference' )
7
- name = at_css ( "#sidebar a[href='#{ File . basename ( slug ) } ']" )
8
- name ? name . content : 'Introduction'
7
+ name = at_css ( "h2" , "h1" )
8
+ ch1 = slug [ /ch(\d +)-(\d +)/ , 1 ]
9
+ ch2 = slug [ /ch(\d +)-(\d +)/ , 2 ]
10
+ name ? "#{ ch1 } .#{ ch2 } . #{ name . content } " : 'Introduction'
9
11
elsif slug == 'error-index'
10
12
'Compiler Errors'
11
13
else
Original file line number Diff line number Diff line change 3
3
module Docs
4
4
class Rust < UrlScraper
5
5
self . type = 'rust'
6
- self . release = '1.87 .0'
6
+ self . release = '1.88 .0'
7
7
self . base_url = 'https://doc.rust-lang.org/'
8
8
self . root_path = 'book/index.html'
9
9
self . initial_paths = %w(
You can’t perform that action at this time.
0 commit comments