History

Update Bash documentation (5.2)

Simon Legner committed 4 years ago

Commit 01b599b1 parent 238d7772 files · +4 −1Browse files

Unified · Split

2 files
  1. lib/docs/filters/bash/clean_html.rb +3 −0
  2. lib/docs/scrapers/bash.rb +1 −1
lib/docs/filters/bash/clean_html.rb+3−0
@@ -2,12 +2,15 @@ module Docs · 1 unmodified line
22 class Bash
33 class CleanHtmlFilter < Filter
44 def call
5+ @doc = at_css('> div[id]') if at_css('> div[id]')
56 # Remove the navigation header and footer and the lines underneath and above it
67 at_css('.header + hr').remove
78 line_above = at_xpath('//div[@class="header"]/preceding::hr[1]')
89 line_above.remove unless line_above.nil?
910 css('.header').remove
1011
12+ css('.copiable-anchor').remove
13+
1114 # Remove chapter and section numbers from title
1215 title_node = at_css('h1, h2, h3, h4, h5, h6')
1316 title_node.content = title_node.content.gsub(/(\d+\.?)+/, '').strip
lib/docs/scrapers/bash.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Bash < FileScraper
33 self.type = 'bash'
4− self.release = '5.1'
4+ self.release = '5.2'
55 self.base_url = 'https://www.gnu.org/software/bash/manual/html_node'
66 self.root_path = 'index.html'
77 self.links = {