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
1313 @doc = container
1414
1515 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'
1719 at_css('h1').content = result[:entries].first.name
1820 elsif title == 'Angular'
1921 at_css('h1').content = slug.split('/').last.gsub('-', ' ')
@@ -42,11 +44,13 @@ module Docs · 22 unmodified lines
4244
4345 css('pre[language]').each do |node|
4446 node['data-language'] = node['language'].sub(/\Ats/, 'typescript').strip
47+ node['data-language'] = 'html' if node.content.start_with?('<')
4548 end
4649
4750 css('pre.prettyprint').each do |node|
4851 node.content = node.content.strip
4952 node['data-language'] = 'dart' if node['class'].include?('dart')
53+ node['data-language'] = 'html' if node.content.start_with?('<')
5054 end
5155
5256 css('.multi-line-signature').each do |node|
lib/docs/scrapers/angular.rb+2−2
@@ -9,7 +9,7 @@ module Docs · 8 unmodified lines
99
1010 html_filters.push 'angular/entries', 'angular/clean_html'
1111
12− options[:skip_patterns] = [/deprecated/]
12+ options[:skip_patterns] = [/deprecated/, /VERSION-let/]
1313 options[:skip] = %w(
1414 index.html
1515 styleguide.html
@@ -42,7 +42,7 @@ module Docs · 26 unmodified lines
4242 end
4343
4444 version '2 TypeScript' do
45− self.release = '2.2.4'
45+ self.release = '2.4.1'
4646 self.base_url = 'https://angular.io/docs/ts/latest/'
4747 end
4848