History

Update Angular documentation (2.4.1)

Thibaut Courouble committed 9 years ago

Commit 67a868c1 parent c2c26ad2 files · +7 −3Browse files

Unified · Split

2 files
  1. lib/docs/filters/angular/clean_html.rb +5 −1
  2. lib/docs/scrapers/angular.rb +2 −2
lib/docs/filters/angular/clean_html.rb+5−1
@@ -13,7 +13,9 @@ module Docs · 12 unmodified lines
13 @doc = container13 @doc = container
14 14
15 title = at_css('h1').content.strip15 title = at_css('h1').content.strip
16 if title == 'Index'16 if root_page?
17 at_css('h1').content = 'Angular Documentation'
18 elsif title == 'Index'
17 at_css('h1').content = result[:entries].first.name19 at_css('h1').content = result[:entries].first.name
18 elsif title == 'Angular'20 elsif title == 'Angular'
19 at_css('h1').content = slug.split('/').last.gsub('-', ' ')21 at_css('h1').content = slug.split('/').last.gsub('-', ' ')
@@ -42,11 +44,13 @@ module Docs · 22 unmodified lines
42 44
43 css('pre[language]').each do |node|45 css('pre[language]').each do |node|
44 node['data-language'] = node['language'].sub(/\Ats/, 'typescript').strip46 node['data-language'] = node['language'].sub(/\Ats/, 'typescript').strip
47 node['data-language'] = 'html' if node.content.start_with?('<')
45 end48 end
46 49
47 css('pre.prettyprint').each do |node|50 css('pre.prettyprint').each do |node|
48 node.content = node.content.strip51 node.content = node.content.strip
49 node['data-language'] = 'dart' if node['class'].include?('dart')52 node['data-language'] = 'dart' if node['class'].include?('dart')
53 node['data-language'] = 'html' if node.content.start_with?('<')
50 end54 end
51 55
52 css('.multi-line-signature').each do |node|56 css('.multi-line-signature').each do |node|
lib/docs/scrapers/angular.rb+2−2
@@ -9,7 +9,7 @@ module Docs · 8 unmodified lines
9 9
10 html_filters.push 'angular/entries', 'angular/clean_html'10 html_filters.push 'angular/entries', 'angular/clean_html'
11 11
12 options[:skip_patterns] = [/deprecated/]12 options[:skip_patterns] = [/deprecated/, /VERSION-let/]
13 options[:skip] = %w(13 options[:skip] = %w(
14 index.html14 index.html
15 styleguide.html15 styleguide.html
@@ -42,7 +42,7 @@ module Docs · 26 unmodified lines
42 end42 end
43 43
44 version '2 TypeScript' do44 version '2 TypeScript' do
45 self.release = '2.2.4'45 self.release = '2.4.1'
46 self.base_url = 'https://angular.io/docs/ts/latest/'46 self.base_url = 'https://angular.io/docs/ts/latest/'
47 end47 end
48 48