File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ def api_page
4646 parent . content = parent . content
4747 parent [ 'data-language' ] = 'kotlin'
4848 end
49+
50+ css ( '.tags' ) . each do |wrapper |
51+ platforms = wrapper . css ( '.platform:not(.tag-value-Common)' ) . to_a
52+ platforms = platforms . map { |node | "#{ node . content } (#{ node [ 'data-tag-version' ] } )" }
53+ platforms = "<b>Platform and version requirements:</b> #{ platforms . join ", " } "
54+ wrapper . replace ( platforms )
55+ end
4956 end
5057 end
5158 end
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ def get_name
55 if subpath . start_with? ( 'api' )
66 breadcrumbs [ 1 ..-1 ] . join ( '.' )
77 else
8- ( at_css ( 'h1' ) || at_css ( 'h2' ) ) . content
8+ node = ( at_css ( 'h1' ) || at_css ( 'h2' ) )
9+ return node . content unless node . nil?
10+ subpath [ /\/ ([a-z0-9_-]+)\. / ] [ 1 ..-2 ] . titleize . sub ( 'Faq' , 'FAQ' )
911 end
1012 end
1113
Original file line number Diff line number Diff line change @@ -22,10 +22,18 @@ class Kotlin < UrlScraper
2222 docs/events.html
2323 docs/resources.html
2424 docs/reference/grammar.html )
25- options [ :replace_paths ] = { 'api/latest/jvm/stdlib/' => 'api/latest/jvm/stdlib/index.html' }
25+ options [ :replace_paths ] = {
26+ 'api/latest/jvm/stdlib/' => 'api/latest/jvm/stdlib/index.html' ,
27+ 'docs/reference/coroutines.html' => 'docs/reference/coroutines-overview.html' ,
28+ 'api/latest/jvm/stdlib/kotlin/fold.html' => 'api/latest/jvm/stdlib/kotlin.collections/fold.html' ,
29+ 'api/latest/jvm/stdlib/kotlin/get-or-else.html' => 'api/latest/jvm/stdlib/kotlin.collections/get-or-else.html' ,
30+ 'api/latest/jvm/stdlib/kotlin/map.html' => 'api/latest/jvm/stdlib/kotlin.collections/map.html' ,
31+ 'docs/tutorials/native/targeting-multiple-platforms.html' => 'docs/tutorials/native/basic-kotlin-native-app.html' ,
32+ 'api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html' => 'api/latest/jvm/stdlib/kotlin/print-stack-trace.html' ,
33+ }
2634
2735 options [ :attribution ] = <<-HTML
28- © 2010–2018 JetBrains s.r.o.< br >
36+ © 2010–2019 JetBrains s.r.o.< br >
2937 Licensed under the Apache License, Version 2.0.
3038 HTML
3139
You can’t perform that action at this time.
0 commit comments