Forráskód Böngészése

Update Bash documentation (5.2)

Simon Legner 3 éve
szülő
commit
01b599b644
2 módosított fájl, 4 hozzáadás és 1 törlés
  1. 3 0
      lib/docs/filters/bash/clean_html.rb
  2. 1 1
      lib/docs/scrapers/bash.rb

+ 3 - 0
lib/docs/filters/bash/clean_html.rb

@@ -2,12 +2,15 @@ module Docs
   class Bash
     class CleanHtmlFilter < Filter
       def call
+        @doc = at_css('> div[id]') if at_css('> div[id]')
         # Remove the navigation header and footer and the lines underneath and above it
         at_css('.header + hr').remove
         line_above = at_xpath('//div[@class="header"]/preceding::hr[1]')
         line_above.remove unless line_above.nil?
         css('.header').remove
 
+        css('.copiable-anchor').remove
+
         # Remove chapter and section numbers from title
         title_node = at_css('h1, h2, h3, h4, h5, h6')
         title_node.content = title_node.content.gsub(/(\d+\.?)+/, '').strip

+ 1 - 1
lib/docs/scrapers/bash.rb

@@ -1,7 +1,7 @@
 module Docs
   class Bash < FileScraper
     self.type = 'bash'
-    self.release = '5.1'
+    self.release = '5.2'
     self.base_url = 'https://www.gnu.org/software/bash/manual/html_node'
     self.root_path = 'index.html'
     self.links = {