Pārlūkot izejas kodu

Update React Native documentation (0.44)

Thibaut Courouble 8 gadi atpakaļ
vecāks
revīzija
ad2f9a4553

+ 3 - 1
assets/stylesheets/pages/_react.scss

@@ -4,7 +4,9 @@
   > h4 { @extend %block-label; }
 
   p code, li code { @extend %label; }
-  blockquote { @extend %note; }
+  blockquote, .deprecated { @extend %note; }
+  .deprecated { @extend %note-orange; }
+  .deprecatedTitle { font-weight: $boldFontWeight; }
 
   span.platform { float: right; }
   span.propType, span.platform { font-weight: normal; }

+ 9 - 1
lib/docs/filters/react_native/clean_html.rb

@@ -6,12 +6,20 @@ module Docs
           css('h1 ~ *').remove
         end
 
-        css('center > .button', 'p:contains("short survey")', 'iframe', '.embedded-simulator').remove
+        css('center > .button', 'p:contains("short survey")', 'iframe', '.embedded-simulator', '.deprecatedIcon').remove
 
         css('h4.methodTitle').each do |node|
           node.name = 'h3'
         end
 
+        css('div:not([class])', 'span:not([class])').each do |node|
+          node.before(node.children).remove
+        end
+
+        css('ul').each do |node|
+          node.before(node.children).remove if node.at_css('> p', '> h2')
+        end
+
         doc
       end
     end

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

@@ -3,7 +3,7 @@ module Docs
     self.name = 'React Native'
     self.slug = 'react_native'
     self.type = 'react'
-    self.release = '0.43'
+    self.release = '0.44'
     self.base_url = 'https://facebook.github.io/react-native/docs/'
     self.root_path = 'getting-started.html'
     self.links = {