History

Update HTML docs

Thibaut committed 12 years ago

Commit f4b736e1 parent 82739ef4 files · +8 −7Browse files

Unified · Split

4 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/html/entries.rb +6 −2
  3. lib/docs/filters/mdn/clean_html.rb +0 −3
  4. lib/docs/scrapers/mdn/mdn.rb +1 −1
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -109,7 +109,7 @@ credits = [ · 108 unmodified lines
109 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'109 'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
110 ], [110 ], [
111 'CSS<br>DOM<br>HTML<br>JavaScript',111 'CSS<br>DOM<br>HTML<br>JavaScript',
112 '2005-2013 Mozilla Developer Network and individual contributors',112 '2005-2014 Mozilla Developer Network and individual contributors',
113 'CC BY-SA',113 'CC BY-SA',
114 'http://creativecommons.org/licenses/by-sa/2.5/'114 'http://creativecommons.org/licenses/by-sa/2.5/'
115 ], [115 ], [
lib/docs/filters/html/entries.rb+6−2
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Html2 class Html
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 HTML5 = %w(content element menuitem template)4 HTML5 = %w(content element video)
5 OBSOLETE = %w(frame frameset hgroup noframes)5 OBSOLETE = %w(frame frameset hgroup noframes)
6 ADDITIONAL_ENTRIES = { 'Heading_Elements' => (1..6).map { |n| ["h#{n}"] } }6 ADDITIONAL_ENTRIES = { 'Heading_Elements' => (1..6).map { |n| ["h#{n}"] } }
7 7
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
14 'Obsolete'14 'Obsolete'
15 else15 else
16 spec = css('.standard-table').last.try(:content)16 spec = css('.standard-table').last.try(:content)
17 if (spec && spec =~ /HTML\s?5/ && spec !~ /HTML\s?4/) || HTML5.include?(slug)17 if (spec && html5_spec?(spec)) || HTML5.include?(slug)
18 'HTML5'18 'HTML5'
19 else19 else
20 'Standard'20 'Standard'
@@ -29,6 +29,10 @@ module Docs · 8 unmodified lines
29 def additional_entries29 def additional_entries
30 ADDITIONAL_ENTRIES[slug] || []30 ADDITIONAL_ENTRIES[slug] || []
31 end31 end
32
33 def html5_spec?(spec)
34 (spec =~ /HTML\s?5/ || spec.include?('WHATWG HTML Living Standard')) && spec !~ /HTML\s?4/
35 end
32 end36 end
33 end37 end
34end38end
lib/docs/filters/mdn/clean_html.rb+0−3
@@ -6,9 +6,6 @@ module Docs · 5 unmodified lines
6 '.htab', # "Browser compatibility" tabs6 '.htab', # "Browser compatibility" tabs
7 '.breadcrumbs', # (e.g. CSS/animation)7 '.breadcrumbs', # (e.g. CSS/animation)
8 '.Quick_links', # (e.g. CSS/animation)8 '.Quick_links', # (e.g. CSS/animation)
9 '.HTMLElmNav', # (e.g. HTML/a)
10 '.htmlMinVerHeader', # (e.g. HTML/article)
11 '.geckoVersionNote', # (e.g. HTML/li)
12 '.todo',9 '.todo',
13 '.draftHeader']10 '.draftHeader']
14 11
lib/docs/scrapers/mdn/mdn.rb+1−1
@@ -11,7 +11,7 @@ module Docs · 10 unmodified lines
11 11
12 options[:trailing_slash] = false12 options[:trailing_slash] = false
13 options[:attribution] = <<-HTML13 options[:attribution] = <<-HTML
14 &copy; 2013 Mozilla Contributors<br>14 &copy; 2014 Mozilla Contributors<br>
15 Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.15 Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
16 HTML16 HTML
17 17