Unified · Split
| @@ -763,7 +763,7 @@ credits = [ · 762 unmodified lines | ||
| 763 | 763 | 'https://twig.symfony.com/license' |
| 764 | 764 | ], [ |
| 765 | 765 | 'TypeScript', |
| 766 | − 'Microsoft and other contributors', | |
| 766 | + '2012-2019 Microsoft', | |
| 767 | 767 | 'Apache', |
| 768 | 768 | 'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE' |
| 769 | 769 | ], [ |
| @@ -9,6 +9,7 @@ module Docs · 8 unmodified lines | ||
| 9 | 9 | end |
| 10 | 10 | |
| 11 | 11 | css('.xs-toc-container').remove |
| 12 | + css('.anchor-hash').remove | |
| 12 | 13 | |
| 13 | 14 | css('article h1').each do |node| |
| 14 | 15 | node.name = 'h2' |
| @@ -19,7 +20,7 @@ module Docs · 4 unmodified lines | ||
| 19 | 20 | end |
| 20 | 21 | |
| 21 | 22 | css('pre > code').each do |node| |
| 22 | − node.parent['data-language'] = node['class'].sub('ts', 'typescript').sub('js', 'javascript').remove('language-') | |
| 23 | + node.parent['data-language'] = node['class'].sub('ts', 'typescript').sub('js', 'javascript').remove('language-') if node['class'] | |
| 23 | 24 | node.content = node.content.gsub(' ', ' ') |
| 24 | 25 | node.before(node.children).remove |
| 25 | 26 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Typescript |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | 4 | def get_name |
| 5 | − name = at_css('h1').content | |
| 5 | + name = at_css('h1').content.strip | |
| 6 | 6 | name.sub! ' and ', ' & ' |
| 7 | 7 | name |
| 8 | 8 | end |
| @@ -24,6 +24,7 @@ module Docs · 15 unmodified lines | ||
| 24 | 24 | |
| 25 | 25 | css('.post-content h1, .post-content h2').each_with_object [] do |node, entries| |
| 26 | 26 | next if node.next_element.try(:name) == 'h2' |
| 27 | + node.css('.anchor-hash').remove | |
| 27 | 28 | name = node.content.strip |
| 28 | 29 | next if name.length > 40 |
| 29 | 30 | next if name == self.name || SKIP_ENTRIES.any? { |str| name.include?(str) } |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Typescript < UrlScraper |
| 3 | 3 | self.name = 'TypeScript' |
| 4 | 4 | self.type = 'simple' |
| 5 | − self.release = '3.1.6' | |
| 5 | + self.release = '3.7.2' | |
| 6 | 6 | self.base_url = 'https://www.typescriptlang.org/docs/' |
| 7 | 7 | self.root_path = 'tutorial.html' |
| 8 | 8 | self.links = { |
| @@ -21,7 +21,7 @@ module Docs · 12 unmodified lines | ||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | options[:attribution] = <<-HTML |
| 24 | − © Microsoft and other contributors<br> | |
| 24 | + © 2012-2019 Microsoft<br> | |
| 25 | 25 | Licensed under the Apache License, Version 2.0. |
| 26 | 26 | HTML |
| 27 | 27 | |