History

Merge pull request #1330 from simon04/kotlin-1.4

Simon Legner committed 5 years ago

Commit a23035d2 parents 74bf81f 90031b53 files · +10 −6Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/kotlin/clean_html.rb +7 −3
  3. lib/docs/scrapers/kotlin.rb +2 −2
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -423,7 +423,7 @@ credits = [ · 422 unmodified lines
423423 'https://raw.githubusercontent.com/koajs/koa/master/LICENSE'
424424 ], [
425425 'Kotlin',
426− '2010-2019 JetBrains s.r.o.',
426+ '2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors',
427427 'Apache',
428428 'https://raw.githubusercontent.com/JetBrains/kotlin/master/license/LICENSE.txt'
429429 ], [
lib/docs/filters/kotlin/clean_html.rb+7−3
@@ -15,10 +15,14 @@ module Docs · 14 unmodified lines
1515 end
1616
1717 css('pre').each do |node|
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"]')
18+ node['data-language'] = 'kotlin' if node.at_css('code.language-kotlin')
19+ node['data-language'] = 'groovy' if node.at_css('code.language-groovy')
20+ node['data-language'] = 'javascript' if node.at_css('code.language-javascript')
21+ node['data-language'] = 'xml' if node.at_css('code.language-xml')
2122 node.content = node.content
23+ node.parent.remove_attribute('data-highlight-only')
24+ node.parent.remove_attribute('data-lang')
25+ node.parent.remove_attribute('theme')
2226 end
2327 end
2428
lib/docs/scrapers/kotlin.rb+2−2
@@ -1,7 +1,7 @@
11 module Docs
22 class Kotlin < UrlScraper
33 self.type = 'kotlin'
4− self.release = '1.3.41'
4+ self.release = '1.4.10'
55 self.base_url = 'https://kotlinlang.org/'
66 self.root_path = 'api/latest/jvm/stdlib/index.html'
77 self.links = {
@@ -33,7 +33,7 @@ module Docs · 25 unmodified lines
3333 }
3434
3535 options[:attribution] = <<-HTML
36− &copy; 2010&ndash;2019 JetBrains s.r.o.<br>
36+ &copy; 2010&ndash;2020 JetBrains s.r.o. and Kotlin Programming Language contributors<br>
3737 Licensed under the Apache License, Version 2.0.
3838 HTML
3939