History

Remove openjdk16 and improve syntax highlight

Enoc committed 5 years ago

Commit 385dcfc1 parent fc900c22 files · +18 −9Browse files

Unified · Split

2 files
  1. lib/docs/filters/openjdk/clean_html_new.rb +18 −0
  2. lib/docs/scrapers/openjdk.rb +0 −9
lib/docs/filters/openjdk/clean_html_new.rb+18−0
@@ -24,6 +24,24 @@ module Docs · 23 unmodified lines
24 end24 end
25 end25 end
26 26
27 # add syntax highlight to code blocks
28 css('pre > code').each do |node|
29 node.parent['class'] = 'lang-java'
30 node.parent['data-language'] = 'java'
31 end
32
33 # add syntax highlight to each method
34 css('.member-signature').each do |node|
35 node.name = 'pre'
36 node['class'] = 'lang-java'
37 node['data-language'] = 'java'
38
39 node.css('span').each do |subnode|
40 subnode.name = 'code'
41 end
42
43 end
44
27 doc45 doc
28 end46 end
29 end47 end
lib/docs/scrapers/openjdk.rb+0−9
@@ -34,15 +34,6 @@ module Docs · 33 unmodified lines
34 34
35 NEWFILTERS = ['openjdk/entries_new', 'openjdk/clean_html_new']35 NEWFILTERS = ['openjdk/entries_new', 'openjdk/clean_html_new']
36 36
37 version '16' do
38 self.release = '16'
39 self.root_path = 'index.html'
40
41 html_filters.push NEWFILTERS
42
43 options[:container] = 'main'
44 end
45
46 version '15' do37 version '15' do
47 self.release = '15.0.1'38 self.release = '15.0.1'
48 self.root_path = 'index.html'39 self.root_path = 'index.html'

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t