Unified · Split
| @@ -2,12 +2,15 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Bash |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | + @doc = at_css('> div[id]') if at_css('> div[id]') | |
| 5 | 6 | # Remove the navigation header and footer and the lines underneath and above it |
| 6 | 7 | at_css('.header + hr').remove |
| 7 | 8 | line_above = at_xpath('//div[@class="header"]/preceding::hr[1]') |
| 8 | 9 | line_above.remove unless line_above.nil? |
| 9 | 10 | css('.header').remove |
| 10 | 11 | |
| 12 | + css('.copiable-anchor').remove | |
| 13 | + | |
| 11 | 14 | # Remove chapter and section numbers from title |
| 12 | 15 | title_node = at_css('h1, h2, h3, h4, h5, h6') |
| 13 | 16 | title_node.content = title_node.content.gsub(/(\d+\.?)+/, '').strip |
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Bash < FileScraper |
| 3 | 3 | self.type = 'bash' |
| 4 | − self.release = '5.1' | |
| 4 | + self.release = '5.2' | |
| 5 | 5 | self.base_url = 'https://www.gnu.org/software/bash/manual/html_node' |
| 6 | 6 | self.root_path = 'index.html' |
| 7 | 7 | self.links = { |