Update OpenJDK documentation (17)

pull/1654/head
Simon Legner 3 years ago
parent b67cf41c0a
commit a50f11fbe7

@ -598,7 +598,7 @@ credits = [
'https://octave.org/doc/interpreter/'
], [
'OpenJDK',
'1993, 2020, Oracle and/or its affiliates. All rights reserved.<br>Licensed under the GNU General Public License, version 2, with the Classpath Exception.<br>Various third party code in OpenJDK is licensed under different licenses.<br>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.',
'1993, 2021, Oracle and/or its affiliates. All rights reserved.<br>Licensed under the GNU General Public License, version 2, with the Classpath Exception.<br>Various third party code in OpenJDK is licensed under different licenses.<br>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.',
'GPLv2',
'http://openjdk.java.net/legal/gplv2+ce.html'
], [

@ -1,5 +1,6 @@
._openjdk {
@extend %simple;
> .inheritance { @extend %note; }
ul.inheritance { list-style: none; }
> ul.inheritance { @extend %note, %note-blue; }

@ -7,6 +7,10 @@ module Docs
at_css('h1').content = "OpenJDK #{release} Documentation"
end
css('.header > h1').each do |node|
node.parent.before(node).remove
end
css('.header .sub-title', 'hr', '.table-tabs').remove
# fix ul section that contains summaries or tables
@ -30,7 +34,7 @@ module Docs
end
# add syntax highlight to each method
css('.member-signature').each do |node|
css('.type-signature, .member-signature').each do |node|
node.content = node.content.sub(/\u200B/, '') # fix zero width space characters
node.name = 'pre'
@ -40,8 +44,25 @@ module Docs
node.css('span').each do |subnode|
subnode.name = 'code'
end
end
# convert pseudo tables (made from div) to real tables
css('div.caption').remove
css('.two-column-summary > .col-constructor-name').add_class('col-first')
css('.two-column-summary, .three-column-summary').each do |table|
# table.previous_element.remove if table.previous_element?.classes?.include?('caption')
table.name = 'table'
tr = nil
table.css('div.col-first, div.col-second, div.col-last').each do |td|
if td.classes.include?('col-first')
table.add_child('<tr>')
tr = table.last_element_child
end
td.name = 'td'
td.name = 'th' if td.classes.include?('table-header')
td.remove_attribute('class')
tr.add_child(td.remove)
end
end
doc

@ -28,7 +28,7 @@ module Docs
]
options[:attribution] = <<-HTML
&copy; 1993, 2020, Oracle and/or its affiliates. All rights reserved.<br>
&copy; 1993, 2021, Oracle and/or its affiliates. All rights reserved.<br>
Documentation extracted from Debian's OpenJDK Development Kit package.<br>
Licensed under the GNU General Public License, version 2, with the Classpath Exception.<br>
Various third party code in OpenJDK is licensed under different licenses (see Debian package).<br>
@ -37,10 +37,10 @@ module Docs
NEWFILTERS = ['openjdk/entries_new', 'openjdk/clean_html_new']
version '15' do
self.release = '15.0.3'
version '17' do
self.release = '17'
self.root_path = 'index.html'
self.base_url = 'https://docs.oracle.com/en/java/javase/15/docs/api/'
self.base_url = 'https://docs.oracle.com/en/java/javase/17/docs/api/'
html_filters.push NEWFILTERS

Loading…
Cancel
Save