From 88d235cb490cc731e2c1197ddda9b317fa86db9a Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 25 Jun 2017 11:37:08 -0400 Subject: [PATCH] Update Yii documentation (2.0.12, 1.1.19) --- assets/stylesheets/pages/_yii.scss | 6 +----- lib/docs/filters/yii/clean_html_v2.rb | 4 +++- lib/docs/filters/yii/entries_v2.rb | 1 + lib/docs/scrapers/yii.rb | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/assets/stylesheets/pages/_yii.scss b/assets/stylesheets/pages/_yii.scss index e2d5f0b7..d8e4bed9 100644 --- a/assets/stylesheets/pages/_yii.scss +++ b/assets/stylesheets/pages/_yii.scss @@ -1,9 +1,5 @@ ._yii { - h2 { @extend %block-heading; } - h3 { @extend %block-label, %label-blue; } - h4 { font-size: 1em; } - - blockquote { @extend %note; } + @extend %simple; .detail-header-tag, .detailHeaderTag { float: right; diff --git a/lib/docs/filters/yii/clean_html_v2.rb b/lib/docs/filters/yii/clean_html_v2.rb index b1fa9157..1ee12405 100644 --- a/lib/docs/filters/yii/clean_html_v2.rb +++ b/lib/docs/filters/yii/clean_html_v2.rb @@ -32,7 +32,7 @@ module Docs node.name = 'th' end - css('.summary', 'span[style]').each do |node| + css('.summary', 'span[style]', 'div.doc-description', 'div.property-doc', 'div.class-description', 'th > span').each do |node| node.before(node.children).remove end @@ -40,6 +40,8 @@ module Docs node.next_element['id'] = node['id'] if node.next_element && node.next_element.name != 'a' end + css('table', 'pre', 'tr', 'td', 'th').remove_attr('class') + doc end end diff --git a/lib/docs/filters/yii/entries_v2.rb b/lib/docs/filters/yii/entries_v2.rb index fb160bcc..878adc2e 100644 --- a/lib/docs/filters/yii/entries_v2.rb +++ b/lib/docs/filters/yii/entries_v2.rb @@ -26,6 +26,7 @@ module Docs name = node.child.content.strip name.prepend "#{self.name} " entries << [name, node['id']] + node.remove_attribute('class') end end end diff --git a/lib/docs/scrapers/yii.rb b/lib/docs/scrapers/yii.rb index 40b7335d..d99d3ac7 100755 --- a/lib/docs/scrapers/yii.rb +++ b/lib/docs/scrapers/yii.rb @@ -8,7 +8,7 @@ module Docs HTML version '2.0' do - self.release = '2.0.11' + self.release = '2.0.12' self.base_url = 'http://www.yiiframework.com/doc-2.0/' self.root_path = 'index.html' self.links = { @@ -23,7 +23,7 @@ module Docs end version '1.1' do - self.release = '1.1.17' + self.release = '1.1.19' self.base_url = 'http://www.yiiframework.com/doc/api/1.1/' self.links = { home: 'http://www.yiiframework.com/',