Unified · Split
| @@ -7,7 +7,7 @@ module Docs · 6 unmodified lines | |||
| 7 | end | 7 | end |
| 8 | 8 | ||
| 9 | def book | 9 | def book |
| 10 | @doc = at_css('.page-inner > section') | 10 | @doc = at_css('.page-inner section') |
| 11 | 11 | ||
| 12 | css('pre > code').each do |node| | 12 | css('pre > code').each do |node| |
| 13 | node.parent['data-language'] = node['class'][/lang-(\w+)/, 1] if node['class'] | 13 | node.parent['data-language'] = node['class'][/lang-(\w+)/, 1] if node['class'] |
| @@ -1,7 +1,7 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Crystal < UrlScraper | 2 | class Crystal < UrlScraper |
| 3 | self.type = 'crystal' | 3 | self.type = 'crystal' |
| 4 | self.release = '0.20.0' | 4 | self.release = '0.20.3' |
| 5 | self.base_url = 'https://crystal-lang.org/' | 5 | self.base_url = 'https://crystal-lang.org/' |
| 6 | self.root_path = "api/#{release}/index.html" | 6 | self.root_path = "api/#{release}/index.html" |
| 7 | self.initial_paths = %w(docs/index.html) | 7 | self.initial_paths = %w(docs/index.html) |