File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ module Docs
2
2
class Jq
3
3
class CleanHtmlFilter < Filter
4
4
def call
5
- content = at_css ( 'div#manualcontent' )
6
-
7
5
css ( '.manual-example' ) . each do |node |
8
6
container = node . parent
9
7
example_header = doc . document . create_element ( 'h4' )
@@ -13,8 +11,7 @@ def call
13
11
node . remove_class ( 'collapse' )
14
12
container . replace ( node )
15
13
end
16
-
17
- content
14
+ doc
18
15
end
19
16
end
20
17
end
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def include_default_entry?
7
7
8
8
def additional_entries
9
9
entries = [ ]
10
- css ( '#manualcontent > section' ) . each do |node |
10
+ css ( '> section' ) . each do |node |
11
11
type = node . at_css ( 'h2' ) . content
12
12
node . css ( '> section' ) . each do |n |
13
13
entries << [ n . at_css ( 'h3' ) . content , n [ 'id' ] , type ]
Original file line number Diff line number Diff line change @@ -3,15 +3,16 @@ class Jq < UrlScraper
3
3
self . name = 'jq'
4
4
self . slug = 'jq'
5
5
self . type = 'jq'
6
- self . release = '1.6 '
6
+ self . release = '1.7 '
7
7
self . links = {
8
- home : 'https://stedolan .github.io/jq/'
8
+ home : 'https://jqlang .github.io/jq/'
9
9
}
10
10
11
- self . base_url = "https://stedolan .github.io/jq/manual/v#{ self . release } /index.html"
11
+ self . base_url = "https://jqlang .github.io/jq/manual/v#{ self . release } /index.html"
12
12
13
13
html_filters . push 'jq/entries' , 'jq/clean_html'
14
14
15
+ options [ :container ] = 'main'
15
16
options [ :skip_links ] = true
16
17
17
18
options [ :attribution ] = <<-HTML
You can’t perform that action at this time.
0 commit comments