|
|
@ -9,7 +9,7 @@ module Docs
|
|
|
|
elsif slug == 'error-index'
|
|
|
|
elsif slug == 'error-index'
|
|
|
|
'Compiler Errors'
|
|
|
|
'Compiler Errors'
|
|
|
|
else
|
|
|
|
else
|
|
|
|
name = at_css('h1.fqn .in-band').content.remove(/\A.+\s/).remove('⎘')
|
|
|
|
name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘')
|
|
|
|
mod = slug.split('/').first
|
|
|
|
mod = slug.split('/').first
|
|
|
|
name.prepend("#{mod}::") unless name.start_with?(mod)
|
|
|
|
name.prepend("#{mod}::") unless name.start_with?(mod)
|
|
|
|
name
|
|
|
|
name
|
|
|
@ -27,7 +27,7 @@ module Docs
|
|
|
|
'Compiler Errors'
|
|
|
|
'Compiler Errors'
|
|
|
|
else
|
|
|
|
else
|
|
|
|
path = name.split('::')
|
|
|
|
path = name.split('::')
|
|
|
|
heading = at_css('h1.fqn .in-band').content.strip
|
|
|
|
heading = at_css('main h1').content.strip
|
|
|
|
if path.length > 2 || (path.length == 2 && (heading.start_with?('Module') || heading.start_with?('Primitive')))
|
|
|
|
if path.length > 2 || (path.length == 2 && (heading.start_with?('Module') || heading.start_with?('Primitive')))
|
|
|
|
path[0..1].join('::')
|
|
|
|
path[0..1].join('::')
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -46,7 +46,7 @@ module Docs
|
|
|
|
else
|
|
|
|
else
|
|
|
|
css('.method')
|
|
|
|
css('.method')
|
|
|
|
.each_with_object({}) { |node, entries|
|
|
|
|
.each_with_object({}) { |node, entries|
|
|
|
|
name = node.at_css('.fnname').try(:content)
|
|
|
|
name = node.at_css('a.fn').try(:content)
|
|
|
|
next unless name
|
|
|
|
next unless name
|
|
|
|
name.prepend "#{self.name}::"
|
|
|
|
name.prepend "#{self.name}::"
|
|
|
|
entries[name] ||= [name, node['id']]
|
|
|
|
entries[name] ||= [name, node['id']]
|
|
|
|