We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 131007f commit 2a2c11bCopy full SHA for 2a2c11b
2 files changed
lib/docs/filters/rust/entries.rb
@@ -4,8 +4,10 @@ class EntriesFilter < Docs::EntriesFilter
4
5
def get_name
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'
+ name = at_css("h2", "h1")
+ ch1 = slug[/ch(\d+)-(\d+)/, 1]
9
+ ch2 = slug[/ch(\d+)-(\d+)/, 2]
10
+ name ? "#{ch1}.#{ch2}. #{name.content}" : 'Introduction'
11
elsif slug == 'error-index'
12
'Compiler Errors'
13
else
lib/docs/scrapers/rust.rb
@@ -3,7 +3,7 @@
3
module Docs
class Rust < UrlScraper
self.type = 'rust'
- self.release = '1.87.0'
+ self.release = '1.88.0'
self.base_url = 'https://doc.rust-lang.org/'
self.root_path = 'book/index.html'
self.initial_paths = %w(
0 commit comments