Skip to content

Commit 9a97067

Browse files
committed
Update MDN docs
1 parent f93ed26 commit 9a97067

6 files changed

Lines changed: 14 additions & 6 deletions

File tree

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ credits = [
181181
'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
182182
], [
183183
'CSS<br>DOM<br>HTML<br>JavaScript<br>SVG<br>XPath',
184-
'2005-2016 Mozilla Developer Network and individual contributors',
184+
'2005-2017 Mozilla Developer Network and individual contributors',
185185
'CC BY-SA',
186186
'https://creativecommons.org/licenses/by-sa/2.5/'
187187
], [

lib/docs/filters/css/entries.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def get_type
5353
type.remove! %r{\(.*\)}
5454
type.sub! 'and', '&'
5555
type.strip!
56+
type = 'Scroll Snap' if type.include?('Scroll Snap')
57+
type = 'Compositing & Blending' if type.include?('Compositing')
5658
type = 'Animations & Transitions' if type.in?(%w(Animations Transitions))
5759
type = 'Image Values' if type == 'Image Values & Replaced Content'
5860
type = 'Variables' if type == 'Custom Properties for Cascading Variables'

lib/docs/filters/dom/entries.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ class EntriesFilter < Docs::EntriesFilter
66
'EXT_' => 'WebGL',
77
'OES_' => 'WebGL',
88
'WEBGL_' => 'WebGL',
9+
'Ambient Light' => 'Ambient Light',
910
'Battery Status' => 'Battery Status',
1011
'Canvas ' => 'Canvas',
12+
'Cooperative Scheduling' => 'Scheduling',
1113
'CSS Font Loading' => 'CSS',
1214
'CSS Object Model' => 'CSS',
1315
'Credential' => 'Credential Management',
@@ -40,6 +42,7 @@ class EntriesFilter < Docs::EntriesFilter
4042
'Web Animations' => 'Animation',
4143
'Web App Manifest' => 'Web App Manifest',
4244
'Web Audio' => 'Web Audio',
45+
'Web Budget' => 'Web Budget',
4346
'Web Messaging' => 'Web Messaging',
4447
'Web MIDI' => 'Web MIDI',
4548
'Web Speech' => 'Web Speech',
@@ -50,12 +53,15 @@ class EntriesFilter < Docs::EntriesFilter
5053
'WebVR' => 'WebVR' }
5154

5255
TYPE_BY_NAME_STARTS_WITH = {
56+
'Ambient' => 'Ambient Light',
5357
'Audio' => 'Web Audio',
5458
'Broadcast' => 'Broadcast Channel',
59+
'Budget' => 'Web Budget',
5560
'Canvas' => 'Canvas',
5661
'CSS' => 'CSS',
5762
'ChildNode' => 'Node',
5863
'console' => 'Console',
64+
'CustomElement' => 'Custom Elements',
5965
'DataTransfer' => 'Drag & Drop',
6066
'document' => 'Document',
6167
'DocumentFragment' => 'DocumentFragment',

lib/docs/filters/javascript/entries.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_type
5151
'Classes'
5252
elsif slug.start_with? 'Errors'
5353
'Errors'
54-
elsif slug.start_with?('Functions') || slug.include?('GeneratorFunction')
54+
elsif slug.start_with?('Functions') || slug.include?('GeneratorFunction') || slug.include?('AsyncFunction')
5555
'Function'
5656
elsif slug.start_with? 'Global_Objects'
5757
object, method = *slug.remove('Global_Objects/').split('/')
@@ -77,7 +77,7 @@ def additional_entries
7777

7878
%w(arithmetic assignment bitwise comparison logical).each do |s|
7979
css("a[href^='operators/#{s}_operators#']").each do |node|
80-
name = node.content.strip
80+
name = CGI::unescapeHTML(node.content.strip)
8181
name.remove! %r{[a-zA-Z]}
8282
name.strip!
8383
entries << [name, node['href'], 'Operators']

lib/docs/scrapers/mdn/css.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Css < Mdn
88

99
options[:root_title] = 'CSS'
1010

11-
options[:skip] = %w(/CSS3 /Media/Visual /paged_media)
11+
options[:skip] = %w(/CSS3 /Media/Visual /paged_media /Media/TV /Media/Tactile)
1212
options[:skip] += %w(/mq-boolean /single-transition-timing-function) # bug
1313
options[:skip_patterns] = [/Extensions/, /Tools/, /@media\/-webkit/, /webkit-mask/, /-moz-system-metric/]
1414

lib/docs/scrapers/mdn/mdn.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class Mdn < UrlScraper
1212
options[:trailing_slash] = false
1313

1414
options[:skip_link] = ->(link) {
15-
link['title'].try(:include?, 'written'.freeze) && !link['href'].try(:include?, 'transform-function'.freeze)
15+
link['title'].try(:include?, 'not yet been written'.freeze) && !link['href'].try(:include?, 'transform-function'.freeze)
1616
}
1717

1818
options[:attribution] = <<-HTML
19-
&copy; 2016 Mozilla Contributors<br>
19+
&copy; 2005&ndash;2017 Mozilla Developer Network and individual contributors.<br>
2020
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
2121
HTML
2222

0 commit comments

Comments
 (0)