From ad2f9a4553d1809e0fe38bb119dec057df66b1e3 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 7 May 2017 11:41:50 -0400 Subject: [PATCH] Update React Native documentation (0.44) --- assets/stylesheets/pages/_react.scss | 4 +++- lib/docs/filters/react_native/clean_html.rb | 10 +++++++++- lib/docs/scrapers/react_native.rb | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/assets/stylesheets/pages/_react.scss b/assets/stylesheets/pages/_react.scss index 74a913a9..8547471f 100644 --- a/assets/stylesheets/pages/_react.scss +++ b/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; } diff --git a/lib/docs/filters/react_native/clean_html.rb b/lib/docs/filters/react_native/clean_html.rb index a4e1ac88..d403bde9 100644 --- a/lib/docs/filters/react_native/clean_html.rb +++ b/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 diff --git a/lib/docs/scrapers/react_native.rb b/lib/docs/scrapers/react_native.rb index 336cd497..99557b7b 100644 --- a/lib/docs/scrapers/react_native.rb +++ b/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 = {