History

Update JavaScript documentation

Thibaut committed 12 years ago

Commit 10b4f441 parent d43d5ff3 files · +12 −5Browse files

Showing the changes to lib/docs/filters/javascript (2 of 3 files). Show all

Unified · Split

2 files
  1. lib/docs/filters/javascript/clean_html.rb +1 −2
  2. lib/docs/filters/javascript/entries.rb +4 −2
lib/docs/filters/javascript/clean_html.rb+1−2
@@ -7,9 +7,8 @@ module Docs · 6 unmodified lines
77 end
88
99 def root
10− css(*%w(#About_this_Reference+div #About_this_Reference #Comments~* #Comments)).remove
11−
1210 # Move "Global Objects" lists to the same level as the other ones
11+ css('#Global_Objects + p').remove
1312 div = at_css '#Global_Objects + div'
1413 div.css('h3').each { |node| node.name = 'h2' }
1514 at_css('#Global_Objects').replace(div.children)
lib/docs/filters/javascript/entries.rb+4−2
@@ -1,7 +1,8 @@
11 module Docs
22 class Javascript
33 class EntriesFilter < Docs::EntriesFilter
4− TYPES = %w(Array Boolean Date Function Intl JSON Math Number Object RegExp String)
4+ TYPES = %w(Array Boolean Date Function Intl JSON Map Math Number Object
5+ RegExp Set String Symbol WeakMap WeakSet)
56 INTL_OBJECTS = %w(Collator DateTimeFormat NumberFormat)
67
78 def get_name
@@ -19,6 +20,7 @@ module Docs · 11 unmodified lines
1920 name
2021 else
2122 name = super
23+ name.remove! 'Functions.'
2224 name.remove! 'Functions and function scope.'
2325 name.remove! 'Operators.'
2426 name.remove! 'Statements.'
@@ -31,7 +33,7 @@ module Docs · 6 unmodified lines
3133 'Statements'
3234 elsif slug.start_with? 'Operators'
3335 'Operators'
34− elsif slug.start_with? 'Functions_and_function_scope'
36+ elsif slug.start_with?('Functions_and_function_scope') || slug.start_with?('Functions')
3537 'Function'
3638 elsif slug.start_with? 'Global_Objects'
3739 object, method = *slug.remove('Global_Objects/').split('/')