[devdocsgjs/main: 1646/1867] Update Cypress documentation (7.2.0)
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1646/1867] Update Cypress documentation (7.2.0)
- Date: Fri, 19 Nov 2021 23:48:12 +0000 (UTC)
commit 1eaf12b94e33babc782a5da0c16a58976514799c
Author: Enoc <brianhernandez222 hotmail com>
Date: Fri May 7 23:28:03 2021 -0600
Update Cypress documentation (7.2.0)
lib/docs/filters/cypress/clean_html.rb | 14 +++++---------
lib/docs/filters/cypress/entries.rb | 2 +-
lib/docs/scrapers/cypress.rb | 6 +++---
3 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/lib/docs/filters/cypress/clean_html.rb b/lib/docs/filters/cypress/clean_html.rb
index 5f60b810..edb35036 100644
--- a/lib/docs/filters/cypress/clean_html.rb
+++ b/lib/docs/filters/cypress/clean_html.rb
@@ -4,17 +4,13 @@ module Docs
class Cypress
class CleanHtmlFilter < Filter
def call
- article_div = at_css('#article > div')
- @doc = article_div unless article_div.nil?
- header = at_css('h1.article-title')
- doc.prepend_child(header) unless header.nil?
-
- css('.article-edit-link').remove
- css('.article-footer').remove
- css('.article-footer-updated').remove
+ css('div[role=alert]').each do |node|
+ node.name = 'blockquote'
+ node.add_class('note info')
+ end
- css('.dashboard-ad').remove
+ css('footer').remove
css('pre').each do |node|
node.content = node.content
diff --git a/lib/docs/filters/cypress/entries.rb b/lib/docs/filters/cypress/entries.rb
index 664f4da7..859fd278 100644
--- a/lib/docs/filters/cypress/entries.rb
+++ b/lib/docs/filters/cypress/entries.rb
@@ -17,7 +17,7 @@ module Docs
].freeze
def get_name
- at_css('h1.article-title').content.strip
+ at_css('h1.main-content-title').content.strip
end
def get_type
diff --git a/lib/docs/scrapers/cypress.rb b/lib/docs/scrapers/cypress.rb
index fee5a6e3..566449f8 100644
--- a/lib/docs/scrapers/cypress.rb
+++ b/lib/docs/scrapers/cypress.rb
@@ -4,9 +4,9 @@ module Docs
class Cypress < UrlScraper
self.name = 'Cypress'
self.type = 'cypress'
- self.release = '6.8.0'
+ self.release = '7.2.0'
self.base_url = 'https://docs.cypress.io'
- self.root_path = '/api/api/table-of-contents.html'
+ self.root_path = '/api/table-of-contents.html'
self.links = {
home: 'https://www.cypress.io/',
code: 'https://github.com/cypress-io/cypress',
@@ -14,7 +14,7 @@ module Docs
html_filters.push 'cypress/entries', 'cypress/clean_html'
- options[:container] = '#content'
+ options[:container] = 'article'
options[:max_image_size] = 300_000
options[:include_default_entry] = true
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]