浏览代码

Update HTML docs

Thibaut 11 年之前
父节点
当前提交
f4b736eb9c

+ 1 - 1
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -109,7 +109,7 @@ credits = [
     'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
   ], [
     'CSS<br>DOM<br>HTML<br>JavaScript',
-    '2005-2013 Mozilla Developer Network and individual contributors',
+    '2005-2014 Mozilla Developer Network and individual contributors',
     'CC BY-SA',
     'http://creativecommons.org/licenses/by-sa/2.5/'
   ], [

+ 6 - 2
lib/docs/filters/html/entries.rb

@@ -1,7 +1,7 @@
 module Docs
   class Html
     class EntriesFilter < Docs::EntriesFilter
-      HTML5 = %w(content element menuitem template)
+      HTML5 = %w(content element video)
       OBSOLETE = %w(frame frameset hgroup noframes)
       ADDITIONAL_ENTRIES = { 'Heading_Elements' => (1..6).map { |n| ["h#{n}"] } }
 
@@ -14,7 +14,7 @@ module Docs
           'Obsolete'
         else
           spec = css('.standard-table').last.try(:content)
-          if (spec && spec =~ /HTML\s?5/ && spec !~ /HTML\s?4/) || HTML5.include?(slug)
+          if (spec && html5_spec?(spec)) || HTML5.include?(slug)
             'HTML5'
           else
             'Standard'
@@ -29,6 +29,10 @@ module Docs
       def additional_entries
         ADDITIONAL_ENTRIES[slug] || []
       end
+
+      def html5_spec?(spec)
+        (spec =~ /HTML\s?5/ || spec.include?('WHATWG HTML Living Standard')) && spec !~ /HTML\s?4/
+      end
     end
   end
 end

+ 0 - 3
lib/docs/filters/mdn/clean_html.rb

@@ -6,9 +6,6 @@ module Docs
         '.htab',             # "Browser compatibility" tabs
         '.breadcrumbs',      # (e.g. CSS/animation)
         '.Quick_links',      # (e.g. CSS/animation)
-        '.HTMLElmNav',       # (e.g. HTML/a)
-        '.htmlMinVerHeader', # (e.g. HTML/article)
-        '.geckoVersionNote', # (e.g. HTML/li)
         '.todo',
         '.draftHeader']
 

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

@@ -11,7 +11,7 @@ module Docs
 
     options[:trailing_slash] = false
     options[:attribution] = <<-HTML
-      &copy; 2013 Mozilla Contributors<br>
+      &copy; 2014 Mozilla Contributors<br>
       Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
     HTML