Showing the changes to lib (3 of 11 files). Show all
Unified · Split
| @@ -2,18 +2,20 @@ module Docs · 1 unmodified line | |||
| 2 | class Puppeteer | 2 | class Puppeteer |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | at_css('h1').content = 'Puppeteer Documentation' | ||
| 6 | |||
| 5 | # None of the elements to remove have classes, so the order of the remove calls is trivial | 7 | # None of the elements to remove have classes, so the order of the remove calls is trivial |
| 6 | 8 | ||
| 7 | # Remove links to previous versions of the reference | 9 | # Remove links to previous versions of the reference |
| 8 | at_css('h5').remove | 10 | at_css('h1 + ul').remove |
| 9 | 11 | ||
| 10 | # Remove table of contents | 12 | # Remove table of contents |
| 11 | at_css('h5').remove | 13 | at_css('h1 + h5').remove |
| 12 | at_css('ul').remove | 14 | at_css('h1 + ul').remove |
| 13 | 15 | ||
| 14 | # Make headers bigger by transforming them into a bigger variant | 16 | # Make headers bigger by transforming them into a bigger variant |
| 15 | css('h3').each {|node| node.name = 'h2'} | 17 | css('h3').each { |node| node.name = 'h2' } |
| 16 | css('h4').each {|node| node.name = 'h3'} | 18 | css('h4').each { |node| node.name = 'h3' } |
| 17 | 19 | ||
| 18 | doc | 20 | doc |
| 19 | end | 21 | end |
| @@ -17,7 +17,7 @@ module Docs · 16 unmodified lines | |||
| 17 | 17 | ||
| 18 | # Prepend events with the class name | 18 | # Prepend events with the class name |
| 19 | if current_name.start_with?('event: ') | 19 | if current_name.start_with?('event: ') |
| 20 | current_name = "#{name} event: '#{current_name[/'(.*)'/, 1]}'" | 20 | current_name = "#{name} event: #{current_name[/'(.*)'/, 1]}" |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | # Remove arguments from functions | 23 | # Remove arguments from functions |
| @@ -1,7 +1,7 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Puppeteer < Github | 2 | class Puppeteer < Github |
| 3 | self.release = '1.6.2' | 3 | self.release = '1.8.0' |
| 4 | self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.6.2/docs/api.md' | 4 | self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.0/docs/api.md' |
| 5 | self.links = { | 5 | self.links = { |
| 6 | code: 'https://github.com/GoogleChrome/puppeteer' | 6 | code: 'https://github.com/GoogleChrome/puppeteer' |
| 7 | } | 7 | } |