فهرست منبع

kotlin: update release 1.4.10

Simon Legner 5 سال پیش
والد
کامیت
90031b56f9
3فایلهای تغییر یافته به همراه10 افزوده شده و 6 حذف شده
  1. 1 1
      assets/javascripts/templates/pages/about_tmpl.coffee
  2. 7 3
      lib/docs/filters/kotlin/clean_html.rb
  3. 2 2
      lib/docs/scrapers/kotlin.rb

+ 1 - 1
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -423,7 +423,7 @@ credits = [
     'https://raw.githubusercontent.com/koajs/koa/master/LICENSE'
   ], [
     'Kotlin',
-    '2010-2019 JetBrains s.r.o.',
+    '2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors',
     'Apache',
     'https://raw.githubusercontent.com/JetBrains/kotlin/master/license/LICENSE.txt'
   ], [

+ 7 - 3
lib/docs/filters/kotlin/clean_html.rb

@@ -15,10 +15,14 @@ module Docs
         end
 
         css('pre').each do |node|
-          node['data-language'] = 'kotlin' if node.at_css('code[data-lang="text/x-kotlin"]')
-          node['data-language'] = 'xml' if node.at_css('code[data-lang="application/xml"]')
-          node['data-language'] = 'javascript' if node.at_css('code[data-lang="text/javascript"]')
+          node['data-language'] = 'kotlin' if node.at_css('code.language-kotlin')
+          node['data-language'] = 'groovy' if node.at_css('code.language-groovy')
+          node['data-language'] = 'javascript' if node.at_css('code.language-javascript')
+          node['data-language'] = 'xml' if node.at_css('code.language-xml')
           node.content = node.content
+          node.parent.remove_attribute('data-highlight-only')
+          node.parent.remove_attribute('data-lang')
+          node.parent.remove_attribute('theme')
         end
       end
 

+ 2 - 2
lib/docs/scrapers/kotlin.rb

@@ -1,7 +1,7 @@
 module Docs
   class Kotlin < UrlScraper
     self.type = 'kotlin'
-    self.release = '1.3.41'
+    self.release = '1.4.10'
     self.base_url = 'https://kotlinlang.org/'
     self.root_path = 'api/latest/jvm/stdlib/index.html'
     self.links = {
@@ -33,7 +33,7 @@ module Docs
     }
 
     options[:attribution] = <<-HTML
-      &copy; 2010&ndash;2019 JetBrains s.r.o.<br>
+      &copy; 2010&ndash;2020 JetBrains s.r.o. and Kotlin Programming Language contributors<br>
       Licensed under the Apache License, Version 2.0.
     HTML