update kotlin version to 1.3.41 (#1023)

update kotlin version to 1.3.41

Co-authored-by: Jasper van Merle <jaspervmerle@gmail.com>
pull/1036/head
Jasper van Merle 6 years ago committed by GitHub
commit 22ae797817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,6 +46,13 @@ module Docs
parent.content = parent.content parent.content = parent.content
parent['data-language'] = 'kotlin' parent['data-language'] = 'kotlin'
end end
css('.tags').each do |wrapper|
platforms = wrapper.css('.platform:not(.tag-value-Common)').to_a
platforms = platforms.map { |node| "#{node.content} (#{node['data-tag-version']})" }
platforms = "<b>Platform and version requirements:</b> #{platforms.join ", "}"
wrapper.replace(platforms)
end
end end
end end
end end

@ -5,7 +5,9 @@ module Docs
if subpath.start_with?('api') if subpath.start_with?('api')
breadcrumbs[1..-1].join('.') breadcrumbs[1..-1].join('.')
else else
(at_css('h1') || at_css('h2')).content node = (at_css('h1') || at_css('h2'))
return node.content unless node.nil?
subpath[/\/([a-z0-9_-]+)\./][1..-2].titleize.sub('Faq', 'FAQ')
end end
end end

@ -1,7 +1,7 @@
module Docs module Docs
class Kotlin < UrlScraper class Kotlin < UrlScraper
self.type = 'kotlin' self.type = 'kotlin'
self.release = '1.2.41' self.release = '1.3.41'
self.base_url = 'https://kotlinlang.org/' self.base_url = 'https://kotlinlang.org/'
self.root_path = 'api/latest/jvm/stdlib/index.html' self.root_path = 'api/latest/jvm/stdlib/index.html'
self.links = { self.links = {
@ -22,10 +22,18 @@ module Docs
docs/events.html docs/events.html
docs/resources.html docs/resources.html
docs/reference/grammar.html) docs/reference/grammar.html)
options[:replace_paths] = { 'api/latest/jvm/stdlib/' => 'api/latest/jvm/stdlib/index.html' } options[:replace_paths] = {
'api/latest/jvm/stdlib/' => 'api/latest/jvm/stdlib/index.html',
'docs/reference/coroutines.html' => 'docs/reference/coroutines-overview.html',
'api/latest/jvm/stdlib/kotlin/fold.html' => 'api/latest/jvm/stdlib/kotlin.collections/fold.html',
'api/latest/jvm/stdlib/kotlin/get-or-else.html' => 'api/latest/jvm/stdlib/kotlin.collections/get-or-else.html',
'api/latest/jvm/stdlib/kotlin/map.html' => 'api/latest/jvm/stdlib/kotlin.collections/map.html',
'docs/tutorials/native/targeting-multiple-platforms.html' => 'docs/tutorials/native/basic-kotlin-native-app.html',
'api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html' => 'api/latest/jvm/stdlib/kotlin/print-stack-trace.html',
}
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2010&ndash;2018 JetBrains s.r.o.<br> &copy; 2010&ndash;2019 JetBrains s.r.o.<br>
Licensed under the Apache License, Version 2.0. Licensed under the Apache License, Version 2.0.
HTML HTML

Loading…
Cancel
Save