Unified · Split
| @@ -16,12 +16,9 @@ module Docs · 15 unmodified lines | ||
| 16 | 16 | @doc = at_css('#main, #main-content') |
| 17 | 17 | |
| 18 | 18 | css('.toggle-wrapper').remove |
| 19 | + css('.anchor').remove | |
| 19 | 20 | |
| 20 | − css('h1.fqn').each do |node| | |
| 21 | − node.content = node.at_css('.in-band').content | |
| 22 | − end | |
| 23 | − | |
| 24 | − css('.main-heading > h1.fqn').each do |node| | |
| 21 | + css('.main-heading > h1').each do |node| | |
| 25 | 22 | node.parent.name = 'h1' |
| 26 | 23 | node.parent.content = node.content |
| 27 | 24 | end |
| @@ -107,6 +104,12 @@ module Docs · 79 unmodified lines | ||
| 107 | 104 | node.content = node.content |
| 108 | 105 | end |
| 109 | 106 | |
| 107 | + css('.rightside').each do |node| | |
| 108 | + node.children.each do |child| | |
| 109 | + child.remove if child.text?() and child.text() == " · " | |
| 110 | + end | |
| 111 | + end | |
| 112 | + | |
| 110 | 113 | css('.since + .srclink').each do |node| |
| 111 | 114 | node.previous_element.before(node) |
| 112 | 115 | end |
| @@ -9,7 +9,7 @@ module Docs · 8 unmodified lines | ||
| 9 | 9 | elsif slug == 'error-index' |
| 10 | 10 | 'Compiler Errors' |
| 11 | 11 | else |
| 12 | − name = at_css('h1.fqn .in-band').content.remove(/\A.+\s/).remove('⎘') | |
| 12 | + name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘') | |
| 13 | 13 | mod = slug.split('/').first |
| 14 | 14 | name.prepend("#{mod}::") unless name.start_with?(mod) |
| 15 | 15 | name |
| @@ -27,7 +27,7 @@ module Docs · 11 unmodified lines | ||
| 27 | 27 | 'Compiler Errors' |
| 28 | 28 | else |
| 29 | 29 | path = name.split('::') |
| 30 | − heading = at_css('h1.fqn .in-band').content.strip | |
| 30 | + heading = at_css('main h1').content.strip | |
| 31 | 31 | if path.length > 2 || (path.length == 2 && (heading.start_with?('Module') || heading.start_with?('Primitive'))) |
| 32 | 32 | path[0..1].join('::') |
| 33 | 33 | else |
| @@ -46,7 +46,7 @@ module Docs · 12 unmodified lines | ||
| 46 | 46 | else |
| 47 | 47 | css('.method') |
| 48 | 48 | .each_with_object({}) { |node, entries| |
| 49 | − name = node.at_css('.fnname').try(:content) | |
| 49 | + name = node.at_css('a.fn').try(:content) | |
| 50 | 50 | next unless name |
| 51 | 51 | name.prepend "#{self.name}::" |
| 52 | 52 | entries[name] ||= [name, node['id']] |
| @@ -3,7 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | module Docs |
| 4 | 4 | class Rust < UrlScraper |
| 5 | 5 | self.type = 'rust' |
| 6 | − self.release = '1.70.0' | |
| 6 | + self.release = '1.71.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( |