Преглед изворни кода

Update Fish documentation (3.5.0)

Simon Legner пре 3 година
родитељ
комит
f3a4b4c3f5
2 измењених фајлова са 9 додато и 1 уклоњено
  1. 1 1
      lib/docs/filters/fish/clean_html_sphinx.rb
  2. 8 0
      lib/docs/scrapers/fish.rb

+ 1 - 1
lib/docs/filters/fish/clean_html_sphinx.rb

@@ -2,7 +2,7 @@ module Docs
   class Fish
     class CleanHtmlSphinxFilter < Filter
       def call
-        @doc = at_css('.body')
+        @doc = at_css('.body > section') or at_css('.body')
         css('pre[data-language="fish"]').each do |node|
           node['data-language'] = 'shell'
         end

+ 8 - 0
lib/docs/scrapers/fish.rb

@@ -16,6 +16,14 @@ module Docs
       Licensed under the GNU General Public License, version 2.
     HTML
 
+    version '3.5' do
+      self.release = '3.5.0'
+      self.base_url = "https://fishshell.com/docs/#{version}/"
+
+      options[:skip].concat %w(genindex.html relnotes.html)
+      html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
+    end
+
     version '3.4' do
       self.release = '3.4.0'
       self.base_url = "https://fishshell.com/docs/#{version}/"