1
0
Эх сурвалжийг харах

Update Babel documentation (7.14.8)

Simon Legner 4 жил өмнө
parent
commit
b5cfc8c7ec

+ 2 - 2
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -108,9 +108,9 @@ credits = [
     'https://raw.githubusercontent.com/caolan/async/master/LICENSE'
   ], [
     'Babel',
-    '2018 Sebastian McKenzie',
+    '2014-present Sebastian McKenzie',
     'MIT',
-    'https://raw.githubusercontent.com/babel/website/master/LICENSE'
+    'https://raw.githubusercontent.com/babel/babel/master/LICENSE'
   ], [
     'Backbone.js',
     '2010-2019 Jeremy Ashkenas, DocumentCloud',

+ 8 - 0
lib/docs/filters/babel/clean_html.rb

@@ -15,6 +15,14 @@ module Docs
 
         css('.docs-prevnext').remove
 
+        css('pre > code.hljs').each do |node|
+          node.parent['data-language'] = node['class'][/language-(\w+)/, 1]
+        end
+
+        css('pre').each do |node|
+          node.content = node.content
+        end
+
         doc
 
       end

+ 2 - 2
lib/docs/scrapers/babel.rb

@@ -25,12 +25,12 @@ module Docs
     ]
 
     options[:attribution] = <<-HTML
-      &copy; 2020 Sebastian McKenzie<br>
+      &copy; 2014-present Sebastian McKenzie<br>
       Licensed under the MIT License.
     HTML
 
     version '7' do
-      self.release = '7.12.6'
+      self.release = '7.14.8'
     end
 
     version '6' do