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
4141 self.html_filters = FilterStack.new
4242 self.text_filters = FilterStack.new
4343
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'
4545 text_filters.push 'images' # ensure the images filter runs after all html filters
4646 text_filters.push 'inner_html', 'clean_text', 'attribution'
4747
lib/docs/scrapers/ansible.rb+1−1
@@ -7,7 +7,7 @@ module Docs · 6 unmodified lines
77 code: 'https://github.com/ansible/ansible'
88 }
99
10− html_filters.push 'ansible/entries', 'sphinx/clean_html', 'parse_cf_email'
10+ html_filters.push 'ansible/entries', 'sphinx/clean_html'
1111
1212 options[:skip] = %w(
1313 glossary.html
lib/docs/scrapers/bootstrap.rb+0−2
@@ -15,8 +15,6 @@ module Docs · 14 unmodified lines
1515 Documentation licensed under the Creative Commons Attribution License v3.0.
1616 HTML
1717
18− html_filters.push 'parse_cf_email'
19−
2018 version '4' do
2119 self.release = '4.0.0'
2220 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
88 code: 'https://github.com/facebook/flow'
99 }
1010
11− html_filters.push 'flow/entries', 'flow/clean_html', 'title', 'parse_cf_email'
11+ html_filters.push 'flow/entries', 'flow/clean_html', 'title'
1212
1313 options[:trailing_slash] = false
1414 options[:root_title] = 'Flow'
lib/docs/scrapers/laravel.rb+1−1
@@ -7,7 +7,7 @@ module Docs · 6 unmodified lines
77 code: 'https://github.com/laravel/laravel'
88 }
99
10− html_filters.push 'laravel/entries', 'laravel/clean_html', 'parse_cf_email'
10+ html_filters.push 'laravel/entries', 'laravel/clean_html'
1111
1212 options[:container] = ->(filter) {
1313 filter.subpath.start_with?('/api') ? '#content' : '.docs-wrapper'
lib/docs/scrapers/node.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
88 code: 'https://github.com/nodejs/node'
99 }
1010
11− html_filters.push 'node/clean_html', 'node/entries', 'title', 'parse_cf_email'
11+ html_filters.push 'node/clean_html', 'node/entries', 'title'
1212
1313 options[:title] = false
1414 options[:root_title] = 'Node.js'
lib/docs/scrapers/vue.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
88 code: 'https://github.com/vuejs/vue'
99 }
1010
11− html_filters.push 'vue/entries', 'vue/clean_html', 'parse_cf_email'
11+ html_filters.push 'vue/entries', 'vue/clean_html'
1212
1313 options[:only_patterns] = [/guide\//, /api\//]
1414 options[:skip] = %w(guide/team.html)
lib/docs/scrapers/yarn.rb+1−1
@@ -8,7 +8,7 @@ module Docs · 7 unmodified lines
88 code: 'https://github.com/yarnpkg/yarn'
99 }
1010
11− html_filters.push 'yarn/entries', 'yarn/clean_html', 'title', 'parse_cf_email'
11+ html_filters.push 'yarn/entries', 'yarn/clean_html', 'title'
1212
1313 options[:root_title] = 'Yarn'
1414 options[:trailing_slash] = false