From f0c16cb9943452e13bec4d9fd2b16a0a92437661 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 22 Oct 2021 21:42:31 +0200 Subject: [PATCH 1/3] Update Vue.js documentation (3.2.20) --- lib/docs/filters/vue/clean_html.rb | 9 +++++++++ lib/docs/scrapers/vue.rb | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/vue/clean_html.rb b/lib/docs/filters/vue/clean_html.rb index affde245..e05c081b 100644 --- a/lib/docs/filters/vue/clean_html.rb +++ b/lib/docs/filters/vue/clean_html.rb @@ -14,6 +14,15 @@ module Docs node.name = 'strong' end + # Remove CodePen div + css('.codepen').each do |node| + next if node.previous_element.nil? + span = node.css('span:contains("See the Pen")').remove + node.previous_element.add_child(' ') + node.previous_element.add_child(span) + node.remove + end + # Remove code highlighting css('figure').each do |node| node.name = 'pre' diff --git a/lib/docs/scrapers/vue.rb b/lib/docs/scrapers/vue.rb index 7a115c13..b4380e9b 100644 --- a/lib/docs/scrapers/vue.rb +++ b/lib/docs/scrapers/vue.rb @@ -10,6 +10,7 @@ module Docs options[:only_patterns] = [/guide\//, /api\//] options[:skip] = %w(guide/team.html) + options[:skip_patterns] = [/guide\/contributing/] options[:replace_paths] = { 'guide/' => 'guide/index.html' } options[:attribution] = <<-HTML @@ -18,7 +19,7 @@ module Docs HTML version '3' do - self.release = '3.2.4' + self.release = '3.2.20' self.base_url = 'https://v3.vuejs.org/' self.root_path = 'guide/introduction.html' self.initial_paths = %w(api/) From a7dbc9d4dd1644a967d9e95160079fc630df601f Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 22 Oct 2021 21:42:39 +0200 Subject: [PATCH 2/3] Update Vue Router documentation (4.0.12) --- lib/docs/filters/vue_router/entries.rb | 6 +++--- lib/docs/scrapers/vue_router.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/docs/filters/vue_router/entries.rb b/lib/docs/filters/vue_router/entries.rb index b38fed28..11c5e8a0 100644 --- a/lib/docs/filters/vue_router/entries.rb +++ b/lib/docs/filters/vue_router/entries.rb @@ -3,7 +3,7 @@ module Docs class EntriesFilter < Docs::EntriesFilter def get_name name = at_css('h1').content - name.remove! '# ' + name.sub! %r{#\s*}, '' name end @@ -34,9 +34,9 @@ module Docs title = node title = title.previous_element until title.name == 'h2' title = title.content.strip - title.remove! '# ' + title.sub! %r{#\s*}, '' - entry_name.remove! '# ' + entry_name.sub! %r{#\s*}, '' case title when 'Router Construction Options' diff --git a/lib/docs/scrapers/vue_router.rb b/lib/docs/scrapers/vue_router.rb index accb8455..3456fd59 100644 --- a/lib/docs/scrapers/vue_router.rb +++ b/lib/docs/scrapers/vue_router.rb @@ -21,7 +21,7 @@ module Docs HTML version '4' do - self.release = '4.0.3' + self.release = '4.0.12' self.base_url = 'https://next.router.vuejs.org/' end From 49d182dfd664067ee3fbd231817fd91651166362 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 22 Oct 2021 21:43:48 +0200 Subject: [PATCH 3/3] Update Vuex documentation (4.0.2) --- lib/docs/filters/vuex/entries.rb | 6 +++--- lib/docs/scrapers/vuex.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/docs/filters/vuex/entries.rb b/lib/docs/filters/vuex/entries.rb index 04846fd2..cb037399 100644 --- a/lib/docs/filters/vuex/entries.rb +++ b/lib/docs/filters/vuex/entries.rb @@ -4,7 +4,7 @@ module Docs def get_name name = at_css('h1').content - name.remove! '# ' + name.sub! %r{#\s*}, '' # Add index on guides unless subpath.start_with?('api') @@ -42,9 +42,9 @@ module Docs title = node title = title.previous_element until title.name == 'h2' title = title.content.strip - title.remove! '# ' + title.sub! %r{#\s*}, '' - entry_name.remove! '# ' + entry_name.sub! %r{#\s*}, '' unless entry_name.start_with?('router.') case title diff --git a/lib/docs/scrapers/vuex.rb b/lib/docs/scrapers/vuex.rb index e2d9c66a..041593fb 100644 --- a/lib/docs/scrapers/vuex.rb +++ b/lib/docs/scrapers/vuex.rb @@ -19,7 +19,7 @@ module Docs HTML version '4' do - self.release = '4.0.0' + self.release = '4.0.2' self.base_url = 'https://next.vuex.vuejs.org/' end