|
|
@ -2,7 +2,7 @@ module Docs
|
|
|
|
class Vue
|
|
|
|
class Vue
|
|
|
|
class EntriesFilter < Docs::EntriesFilter
|
|
|
|
class EntriesFilter < Docs::EntriesFilter
|
|
|
|
def get_name
|
|
|
|
def get_name
|
|
|
|
at_css('h1').content
|
|
|
|
at_css('h1').content.presence || 'API'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def get_type
|
|
|
|
def get_type
|
|
|
@ -15,11 +15,16 @@ module Docs
|
|
|
|
|
|
|
|
|
|
|
|
def additional_entries
|
|
|
|
def additional_entries
|
|
|
|
return [] if slug.start_with?('guide')
|
|
|
|
return [] if slug.start_with?('guide')
|
|
|
|
|
|
|
|
type = nil
|
|
|
|
|
|
|
|
|
|
|
|
css('h3').map do |node|
|
|
|
|
css('h2, h3').each_with_object [] do |node, entries|
|
|
|
|
name = node.content.strip
|
|
|
|
if node.name == 'h2'
|
|
|
|
name.sub! %r{\(.*\)}, '()'
|
|
|
|
type = node.content.strip
|
|
|
|
[name, node['id'], "API: #{self.name}"]
|
|
|
|
else
|
|
|
|
|
|
|
|
name = node.content.strip
|
|
|
|
|
|
|
|
name.sub! %r{\(.*\)}, '()'
|
|
|
|
|
|
|
|
entries << [name, node['id'], "API: #{type}"]
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|