From 18958f4cd271b44eaf3063a8f4c431e5d6cee392 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Wed, 29 Jan 2020 11:49:15 -0500 Subject: [PATCH] Update Flow docs clean up homepage, 0.117 --- lib/docs/filters/flow/clean_html.rb | 5 ++++- lib/docs/scrapers/flow.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/flow/clean_html.rb b/lib/docs/filters/flow/clean_html.rb index 50269f8a..8d5a152f 100644 --- a/lib/docs/filters/flow/clean_html.rb +++ b/lib/docs/filters/flow/clean_html.rb @@ -14,7 +14,10 @@ module Docs end css('a.card').each do |node| - node.at_css('.text-primary').replace %(
Read more) + title = node.at_css('.card-title') + title.inner_html = %(#{title.inner_html}) + node.at_css('.text-primary').remove + node.css('[class]').each { |node| node.delete 'class' } node.before(node.children).remove end end diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb index 8853c954..ceb95fc9 100644 --- a/lib/docs/scrapers/flow.rb +++ b/lib/docs/scrapers/flow.rb @@ -1,7 +1,7 @@ module Docs class Flow < UrlScraper self.type = 'simple' - self.release = '0.116.0' + self.release = '0.117.0' self.base_url = 'https://flow.org/en/docs/' self.links = { home: 'https://flow.org/',