|
|
@ -9,6 +9,7 @@ module Docs
|
|
|
|
|
|
|
|
|
|
|
|
REPLACE_TYPES = {
|
|
|
|
REPLACE_TYPES = {
|
|
|
|
'Quick Start' => 'Guides',
|
|
|
|
'Quick Start' => 'Guides',
|
|
|
|
|
|
|
|
'The Basics' => 'Getting Started',
|
|
|
|
'apis' => 'APIs',
|
|
|
|
'apis' => 'APIs',
|
|
|
|
'components' => 'Components'
|
|
|
|
'components' => 'Components'
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -40,12 +41,12 @@ module Docs
|
|
|
|
else
|
|
|
|
else
|
|
|
|
entries = []
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
|
|
|
|
css('.props > .prop > .propTitle').each do |node| # react-native
|
|
|
|
css('.props > .prop > .propTitle', '.props > .prop > .methodTitle').each do |node| # react-native
|
|
|
|
name = node.children.find(&:text?).try(:content)
|
|
|
|
name = node.children.find(&:text?).try(:content)
|
|
|
|
next if name.blank?
|
|
|
|
next if name.blank?
|
|
|
|
sep = node.content.include?('static') ? '.' : '#'
|
|
|
|
sep = node.content.include?('static') ? '.' : '#'
|
|
|
|
name.prepend(self.name + sep)
|
|
|
|
name.prepend(self.name + sep)
|
|
|
|
name << '()' if (n = node.css('.propType').last) && n.content.start_with?('(')
|
|
|
|
name << '()' if node['class'].include?('methodTitle')
|
|
|
|
id = node.at_css('.anchor')['name']
|
|
|
|
id = node.at_css('.anchor')['name']
|
|
|
|
entries << [name, id]
|
|
|
|
entries << [name, id]
|
|
|
|
end
|
|
|
|
end
|
|
|
|