Merge pull request #1133 from simon04/typescript

typescript: update to 3.7.2
pull/1158/head
Jed Fox 5 years ago
commit 33c2d1435a

@ -763,7 +763,7 @@ credits = [
'https://twig.symfony.com/license'
], [
'TypeScript',
'Microsoft and other contributors',
'2012-2019 Microsoft',
'Apache',
'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE'
], [

@ -9,6 +9,7 @@ module Docs
end
css('.xs-toc-container').remove
css('.anchor-hash').remove
css('article h1').each do |node|
node.name = 'h2'
@ -19,7 +20,7 @@ module Docs
end
css('pre > code').each do |node|
node.parent['data-language'] = node['class'].sub('ts', 'typescript').sub('js', 'javascript').remove('language-')
node.parent['data-language'] = node['class'].sub('ts', 'typescript').sub('js', 'javascript').remove('language-') if node['class']
node.content = node.content.gsub(' ', ' ')
node.before(node.children).remove
end

@ -2,7 +2,7 @@ module Docs
class Typescript
class EntriesFilter < Docs::EntriesFilter
def get_name
name = at_css('h1').content
name = at_css('h1').content.strip
name.sub! ' and ', ' & '
name
end
@ -24,6 +24,7 @@ module Docs
css('.post-content h1, .post-content h2').each_with_object [] do |node, entries|
next if node.next_element.try(:name) == 'h2'
node.css('.anchor-hash').remove
name = node.content.strip
next if name.length > 40
next if name == self.name || SKIP_ENTRIES.any? { |str| name.include?(str) }

@ -2,7 +2,7 @@ module Docs
class Typescript < UrlScraper
self.name = 'TypeScript'
self.type = 'simple'
self.release = '3.1.6'
self.release = '3.7.2'
self.base_url = 'https://www.typescriptlang.org/docs/'
self.root_path = 'tutorial.html'
self.links = {
@ -21,7 +21,7 @@ module Docs
}
options[:attribution] = <<-HTML
&copy; Microsoft and other contributors<br>
&copy; 2012-2019 Microsoft<br>
Licensed under the Apache License, Version 2.0.
HTML

Loading…
Cancel
Save