Update Babel documentation (7.21.1)

See #1926
pull/1931/head
Simon Legner 2 years ago
parent bfc0e59e8e
commit 7fd7b0e151

@ -3,6 +3,8 @@ module Docs
class CleanHtmlFilter < Filter
def call
@doc = at_css('.theme-doc-markdown')
css('.fixedHeaderContainer').remove
css('.toc').remove
@ -15,14 +17,17 @@ 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
node.content = node.css('.token-line').map(&:content).join("\n")
node['data-language'] = node['class'][/language-(\w+)/, 1]
end
css('.codeBlockTitle_x_ju').remove
css('*').remove_attr('class')
css('*').remove_attr('style')
doc
end

@ -1,7 +1,7 @@
module Docs
class Babel < UrlScraper
self.type = 'simple'
self.base_url = 'https://babeljs.io/docs/en/'
self.base_url = 'https://babeljs.io/docs/'
self.links = {
home: 'https://babeljs.io/',
code: 'https://github.com/babel/babel'
@ -30,7 +30,7 @@ module Docs
HTML
version '7' do
self.release = '7.16.4'
self.release = '7.21.1'
end
version '6' do

Loading…
Cancel
Save