|
|
@ -4,20 +4,13 @@ module Docs
|
|
|
|
def additional_entries
|
|
|
|
def additional_entries
|
|
|
|
entries = []
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
|
|
|
|
css('h2').each do |node|
|
|
|
|
css('.toc-container h2').each do |heading|
|
|
|
|
type = node.content.split.first
|
|
|
|
type = heading.content.split.first
|
|
|
|
type.remove! %r{\W} # remove quotation marks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
node.parent.css('h3').each do |heading|
|
|
|
|
heading.parent.css('a').each do |link|
|
|
|
|
name = heading.content
|
|
|
|
name = link.content
|
|
|
|
name.sub! %r{\(.+?\)}, '()'
|
|
|
|
name = name.remove(/\u{2192}.*/)
|
|
|
|
entries << [name, heading['id'], type]
|
|
|
|
entries << [name, link['href'].remove('#'), type]
|
|
|
|
|
|
|
|
|
|
|
|
if h4 = heading.parent.at_css('h4') and h4.content.strip == 'Aliases'
|
|
|
|
|
|
|
|
h4.next_element.content.split(',').each do |n|
|
|
|
|
|
|
|
|
entries << ["#{n.strip}()", heading['id'], type]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|