Unified · Split
| @@ -17,7 +17,7 @@ module Docs · 16 unmodified lines | ||
| 17 | 17 | end |
| 18 | 18 | |
| 19 | 19 | css('a.anchor', 'a.hashref').each do |node| |
| 20 | − node.parent['id'] = node['name'] || node['id'] | |
| 20 | + node.parent['id'] ||= node['name'] || node['id'] | |
| 21 | 21 | end |
| 22 | 22 | |
| 23 | 23 | css('.highlight').each do |node| |
| @@ -22,7 +22,8 @@ module Docs · 21 unmodified lines | ||
| 22 | 22 | name.remove! %r{\w+\:} |
| 23 | 23 | name.strip! |
| 24 | 24 | name = 'createFragmentobject' if name.include?('createFragmentobject') |
| 25 | − id = node.parent.at_css('.anchor')['name'] | |
| 25 | + id = name.parameterize | |
| 26 | + node.parent['id'] = id | |
| 26 | 27 | type = if slug == 'react-component' |
| 27 | 28 | 'Reference: Component' |
| 28 | 29 | elsif slug == 'react-api' |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class React < UrlScraper |
| 3 | 3 | self.name = 'React' |
| 4 | 4 | self.type = 'react' |
| 5 | − self.release = '15.4.2' | |
| 5 | + self.release = '15.5.0' | |
| 6 | 6 | self.base_url = 'https://facebook.github.io/react/docs/' |
| 7 | 7 | self.root_path = 'hello-world.html' |
| 8 | 8 | self.links = { |