Unified · Split
| @@ -18,6 +18,7 @@ module Docs · 17 unmodified lines | |||
| 18 | end | 18 | end |
| 19 | 19 | ||
| 20 | css('pre').each do |node| | 20 | css('pre').each do |node| |
| 21 | node['data-language'] = 'js' | ||
| 21 | node['data-language'] = node['class'][/language-(\w+)/, 1] if node['class'] | 22 | node['data-language'] = node['class'][/language-(\w+)/, 1] if node['class'] |
| 22 | node.content = node.content | 23 | node.content = node.content |
| 23 | end | 24 | end |
| @@ -6,7 +6,7 @@ module Docs · 5 unmodified lines | |||
| 6 | end | 6 | end |
| 7 | 7 | ||
| 8 | def get_type | 8 | def get_type |
| 9 | type = at_css('.navItemActive').ancestors('.navGroup').first.at_css('h3').content | 9 | type = at_css('.navListItemActive').ancestors('.navGroup').first.at_css('h3').content |
| 10 | 10 | ||
| 11 | if type == 'Introduction' | 11 | if type == 'Introduction' |
| 12 | 'Guides: Introduction' | 12 | 'Guides: Introduction' |
| @@ -1,9 +1,9 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Jest < UrlScraper | 2 | class Jest < UrlScraper |
| 3 | self.type = 'jest' | 3 | self.type = 'jest' |
| 4 | self.release = '23.1.0' | 4 | self.release = '23.3.0' |
| 5 | self.base_url = 'https://facebook.github.io/jest/docs/en/' | 5 | self.base_url = 'https://jestjs.io/docs/en/' |
| 6 | self.root_path = 'getting-started.html' | 6 | self.root_path = 'getting-started' |
| 7 | self.links = { | 7 | self.links = { |
| 8 | home: 'https://facebook.github.io/jest/', | 8 | home: 'https://facebook.github.io/jest/', |
| 9 | code: 'https://github.com/facebook/jest' | 9 | code: 'https://github.com/facebook/jest' |