[devdocsgjs/main: 974/1867] typescript: update to 3.7.2




commit c60aa3e506c8c0fd80b04b2b4663f22955b0b141
Author: Simon Legner <Simon Legner gmail com>
Date:   Sun Nov 24 18:21:58 2019 +0100

    typescript: update to 3.7.2

 assets/javascripts/templates/pages/about_tmpl.coffee | 2 +-
 lib/docs/filters/typescript/clean_html.rb            | 3 ++-
 lib/docs/filters/typescript/entries.rb               | 3 ++-
 lib/docs/scrapers/typescript.rb                      | 4 ++--
 4 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee 
b/assets/javascripts/templates/pages/about_tmpl.coffee
index 0165ade2..b4a179a0 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -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'
   ], [
diff --git a/lib/docs/filters/typescript/clean_html.rb b/lib/docs/filters/typescript/clean_html.rb
index 24aed5a6..0d358879 100644
--- a/lib/docs/filters/typescript/clean_html.rb
+++ b/lib/docs/filters/typescript/clean_html.rb
@@ -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
diff --git a/lib/docs/filters/typescript/entries.rb b/lib/docs/filters/typescript/entries.rb
index 19bcbe3f..43d577b0 100644
--- a/lib/docs/filters/typescript/entries.rb
+++ b/lib/docs/filters/typescript/entries.rb
@@ -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) }
diff --git a/lib/docs/scrapers/typescript.rb b/lib/docs/scrapers/typescript.rb
index 777f5dd6..828dd733 100644
--- a/lib/docs/scrapers/typescript.rb
+++ b/lib/docs/scrapers/typescript.rb
@@ -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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]