diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb
index d89cf6cb..9bc1249c 100644
--- a/lib/docs/scrapers/react.rb
+++ b/lib/docs/scrapers/react.rb
@@ -8,19 +8,27 @@ module Docs
code: 'https://github.com/facebook/react'
}
+ options[:attribution] = <<-HTML
+ © 2013–present Facebook Inc.
+ Licensed under the Creative Commons Attribution 4.0 International Public License.
+ HTML
+
version do
- self.release = '18.3.1'
+ self.release = '19'
self.base_url = 'https://react.dev'
self.initial_paths = %w(/reference/react /learn)
-
html_filters.push 'react/entries_react_dev', 'react/clean_html_react_dev'
options[:only_patterns] = [/\A\/learn/, /\A\/reference/]
+ end
+
+ version '18' do
+ self.release = '18.3.1'
+ self.base_url = 'https://18.react.dev'
+ self.initial_paths = %w(/reference/react /learn)
+ html_filters.push 'react/entries_react_dev', 'react/clean_html_react_dev'
- options[:attribution] = <<-HTML
- © 2013–present Facebook Inc.
- Licensed under the Creative Commons Attribution 4.0 International Public License.
- HTML
+ options[:only_patterns] = [/\A\/learn/, /\A\/reference/]
end
version '17' do
@@ -42,11 +50,6 @@ module Docs
'working-with-the-browser.html' => 'refs-and-the-dom.html',
'top-level-api.html' => 'react-api.html',
}
-
- options[:attribution] = <<-HTML
- © 2013–present Facebook Inc.
- Licensed under the Creative Commons Attribution 4.0 International Public License.
- HTML
end
def get_latest_version(opts)