Browse Source

Improve JavaScript scraper

Thibaut 11 years ago
parent
commit
f2abb3552f
2 changed files with 7 additions and 3 deletions
  1. 3 2
      lib/docs/filters/javascript/entries.rb
  2. 4 1
      lib/docs/scrapers/mdn/javascript.rb

+ 3 - 2
lib/docs/filters/javascript/entries.rb

@@ -1,8 +1,9 @@
 module Docs
   class Javascript
     class EntriesFilter < Docs::EntriesFilter
-      TYPES = %w(Array Boolean Date Function Intl JSON Map Math Number Object
-        RegExp Set String Symbol WeakMap WeakSet)
+      TYPES = %w(Array ArrayBuffer Boolean DataView Date Function Intl JSON Map
+        Math Number Object Promise RegExp Set String Symbol TypedArray WeakMap
+        WeakSet)
       INTL_OBJECTS = %w(Collator DateTimeFormat NumberFormat)
 
       def get_name

+ 4 - 1
lib/docs/scrapers/mdn/javascript.rb

@@ -24,7 +24,8 @@ module Docs
       /Strict_mode
       /Functions/rest_parameters
       /Methods_Index
-      /Properties_Index)
+      /Properties_Index
+      /Strict_mode/Transitioning_to_strict_mode)
 
     # Duplicates
     options[:skip].concat %w(
@@ -38,6 +39,8 @@ module Docs
       url.sub! 'https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference', Javascript.base_url
       url.sub! 'https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference', Javascript.base_url
       url.sub! '/Operators/Special/', '/Operators/'
+      url.sub! 'Destructing_assignment', 'Destructuring_assignment'
+      url.sub! 'Array.prototype.values()', 'values'
       url
     end
   end