History

Add ParseCfEmail filter to the default stack used by all scrapers

Thibaut Courouble committed 8 years ago

Commit c7a10ef1 parent 608853b8 files · +7 −9Browse files

Unified · Split

8 files
  1. lib/docs/core/scraper.rb +1 −1
  2. lib/docs/scrapers/ansible.rb +1 −1
  3. lib/docs/scrapers/bootstrap.rb +0 −2
  4. lib/docs/scrapers/flow.rb +1 −1
  5. lib/docs/scrapers/laravel.rb +1 −1
  6. lib/docs/scrapers/node.rb +1 −1
  7. lib/docs/scrapers/vue.rb +1 −1
  8. lib/docs/scrapers/yarn.rb +1 −1
lib/docs/core/scraper.rb+1−1
@@ -41,7 +41,7 @@ module Docs · 40 unmodified lines
41 self.html_filters = FilterStack.new41 self.html_filters = FilterStack.new
42 self.text_filters = FilterStack.new42 self.text_filters = FilterStack.new
43 43
44 html_filters.push 'apply_base_url', 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths'44 html_filters.push 'apply_base_url', 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths', 'parse_cf_email'
45 text_filters.push 'images' # ensure the images filter runs after all html filters45 text_filters.push 'images' # ensure the images filter runs after all html filters
46 text_filters.push 'inner_html', 'clean_text', 'attribution'46 text_filters.push 'inner_html', 'clean_text', 'attribution'
47 47
lib/docs/scrapers/ansible.rb+1−1
@@ -7,7 +7,7 @@ module Docs · 6 unmodified lines
7 code: 'https://github.com/ansible/ansible'7 code: 'https://github.com/ansible/ansible'
8 }8 }
9 9
10 html_filters.push 'ansible/entries', 'sphinx/clean_html', 'parse_cf_email'10 html_filters.push 'ansible/entries', 'sphinx/clean_html'
11 11
12 options[:skip] = %w(12 options[:skip] = %w(
13 glossary.html13 glossary.html
lib/docs/scrapers/bootstrap.rb+0−2
@@ -15,8 +15,6 @@ module Docs · 14 unmodified lines
15 Documentation licensed under the Creative Commons Attribution License v3.0.15 Documentation licensed under the Creative Commons Attribution License v3.0.
16 HTML16 HTML
17 17
18 html_filters.push 'parse_cf_email'
19
20 version '4' do18 version '4' do
21 self.release = '4.0.0'19 self.release = '4.0.0'
22 self.base_url = 'https://getbootstrap.com/docs/4.0/'20 self.base_url = 'https://getbootstrap.com/docs/4.0/'
lib/docs/scrapers/flow.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
8 code: 'https://github.com/facebook/flow'8 code: 'https://github.com/facebook/flow'
9 }9 }
10 10
11 html_filters.push 'flow/entries', 'flow/clean_html', 'title', 'parse_cf_email'11 html_filters.push 'flow/entries', 'flow/clean_html', 'title'
12 12
13 options[:trailing_slash] = false13 options[:trailing_slash] = false
14 options[:root_title] = 'Flow'14 options[:root_title] = 'Flow'
lib/docs/scrapers/laravel.rb+1−1
@@ -7,7 +7,7 @@ module Docs · 6 unmodified lines
7 code: 'https://github.com/laravel/laravel'7 code: 'https://github.com/laravel/laravel'
8 }8 }
9 9
10 html_filters.push 'laravel/entries', 'laravel/clean_html', 'parse_cf_email'10 html_filters.push 'laravel/entries', 'laravel/clean_html'
11 11
12 options[:container] = ->(filter) {12 options[:container] = ->(filter) {
13 filter.subpath.start_with?('/api') ? '#content' : '.docs-wrapper'13 filter.subpath.start_with?('/api') ? '#content' : '.docs-wrapper'
lib/docs/scrapers/node.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
8 code: 'https://github.com/nodejs/node'8 code: 'https://github.com/nodejs/node'
9 }9 }
10 10
11 html_filters.push 'node/clean_html', 'node/entries', 'title', 'parse_cf_email'11 html_filters.push 'node/clean_html', 'node/entries', 'title'
12 12
13 options[:title] = false13 options[:title] = false
14 options[:root_title] = 'Node.js'14 options[:root_title] = 'Node.js'
lib/docs/scrapers/vue.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
8 code: 'https://github.com/vuejs/vue'8 code: 'https://github.com/vuejs/vue'
9 }9 }
10 10
11 html_filters.push 'vue/entries', 'vue/clean_html', 'parse_cf_email'11 html_filters.push 'vue/entries', 'vue/clean_html'
12 12
13 options[:only_patterns] = [/guide\//, /api\//]13 options[:only_patterns] = [/guide\//, /api\//]
14 options[:skip] = %w(guide/team.html)14 options[:skip] = %w(guide/team.html)
lib/docs/scrapers/yarn.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
8 code: 'https://github.com/yarnpkg/yarn'8 code: 'https://github.com/yarnpkg/yarn'
9 }9 }
10 10
11 html_filters.push 'yarn/entries', 'yarn/clean_html', 'title', 'parse_cf_email'11 html_filters.push 'yarn/entries', 'yarn/clean_html', 'title'
12 12
13 options[:root_title] = 'Yarn'13 options[:root_title] = 'Yarn'
14 options[:trailing_slash] = false14 options[:trailing_slash] = false