[devdocsgjs/main: 1853/1867] Update OpenJDK documentation (17)
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1853/1867] Update OpenJDK documentation (17)
- Date: Fri, 19 Nov 2021 23:48:23 +0000 (UTC)
commit a50f11fbe7d85e7346b7d6030b6a34ffedc17c44
Author: Simon Legner <Simon Legner gmail com>
Date: Mon Nov 1 22:05:20 2021 +0100
Update OpenJDK documentation (17)
.../javascripts/templates/pages/about_tmpl.coffee | 2 +-
assets/stylesheets/pages/_openjdk.scss | 1 +
lib/docs/filters/openjdk/clean_html_new.rb | 25 ++++++++++++++++++++--
lib/docs/scrapers/openjdk.rb | 8 +++----
4 files changed, 29 insertions(+), 7 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee
b/assets/javascripts/templates/pages/about_tmpl.coffee
index 4b4607d7..1139b2a6 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -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'
], [
diff --git a/assets/stylesheets/pages/_openjdk.scss b/assets/stylesheets/pages/_openjdk.scss
index 612096f7..7330951a 100644
--- a/assets/stylesheets/pages/_openjdk.scss
+++ b/assets/stylesheets/pages/_openjdk.scss
@@ -1,5 +1,6 @@
._openjdk {
@extend %simple;
+ > .inheritance { @extend %note; }
ul.inheritance { list-style: none; }
> ul.inheritance { @extend %note, %note-blue; }
diff --git a/lib/docs/filters/openjdk/clean_html_new.rb b/lib/docs/filters/openjdk/clean_html_new.rb
index 81c90216..90341926 100644
--- a/lib/docs/filters/openjdk/clean_html_new.rb
+++ b/lib/docs/filters/openjdk/clean_html_new.rb
@@ -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
diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb
index 8d334f28..8bd5e719 100644
--- a/lib/docs/scrapers/openjdk.rb
+++ b/lib/docs/scrapers/openjdk.rb
@@ -28,7 +28,7 @@ module Docs
]
options[:attribution] = <<-HTML
- © 1993, 2020, Oracle and/or its affiliates. All rights reserved.<br>
+ © 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]