Showing the changes to lib/docs (2 of 2 files). Show all
Unified · Split
| @@ -15,7 +15,9 @@ module Docs · 14 unmodified lines | ||
| 15 | 15 | end |
| 16 | 16 | |
| 17 | 17 | css('pre').each do |node| |
| 18 | − node['data-language'] = node.at_css('code')['class'][/lang_(\w+)/, 1] if node.at_css('code') | |
| 18 | + node['data-language'] = 'kotlin' if node.at_css('code[data-lang="text/x-kotlin"]') | |
| 19 | + node['data-language'] = 'xml' if node.at_css('code[data-lang="application/xml"]') | |
| 20 | + node['data-language'] = 'javascript' if node.at_css('code[data-lang="text/javascript"]') | |
| 19 | 21 | node.content = node.content |
| 20 | 22 | end |
| 21 | 23 | end |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Kotlin < UrlScraper |
| 3 | 3 | self.type = 'kotlin' |
| 4 | − self.release = '1.0.3' | |
| 4 | + self.release = '1.0.4' | |
| 5 | 5 | self.base_url = 'https://kotlinlang.org/' |
| 6 | 6 | self.root_path = 'api/latest/jvm/stdlib/index.html' |
| 7 | 7 | self.links = { |