Browse Source

eslint: update release 7.13.0

Simon Legner 5 năm trước cách đây
mục cha
commit
65df0b3a33
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 3 2
      lib/docs/filters/eslint/clean_html.rb
  2. 1 1
      lib/docs/scrapers/eslint.rb

+ 3 - 2
lib/docs/filters/eslint/clean_html.rb

@@ -4,6 +4,7 @@ module Docs
       def call
         @doc = at_css('.doc') if at_css('.doc')
 
+        css('.eslint-ad').remove
         css('.glyphicon').remove
         css('hr', 'colgroup', 'td:empty').remove
 
@@ -11,8 +12,8 @@ module Docs
           node.before(node.children).remove
         end
 
-        css('div.highlighter-rouge').each do |node|
-          lang = node['class'][/language-(\w+)/, 1]
+        css('pre.hljs').each do |node|
+          lang = node['class'][/highlight-(\w+)/, 1]
           node['data-language'] = lang if lang
           node.content = node.content.strip
           node.name = 'pre'

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

@@ -2,7 +2,7 @@ module Docs
   class Eslint < UrlScraper
     self.name = 'ESLint'
     self.type = 'simple'
-    self.release = '6.8.0'
+    self.release = '7.13.0'
     self.base_url = 'https://eslint.org/docs/'
     self.root_path = 'user-guide/getting-started'
     self.links = {