Unified · Split
| @@ -192,7 +192,7 @@ credits = [ · 191 unmodified lines | |||
| 192 | 'https://raw.github.com/rails/rails/master/activerecord/MIT-LICENSE' | 192 | 'https://raw.github.com/rails/rails/master/activerecord/MIT-LICENSE' |
| 193 | ], [ | 193 | ], [ |
| 194 | 'Sass', | 194 | 'Sass', |
| 195 | '2006-2013 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein', | 195 | '2006-2014 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein', |
| 196 | 'MIT', | 196 | 'MIT', |
| 197 | 'https://raw.github.com/nex3/sass/master/MIT-LICENSE' | 197 | 'https://raw.github.com/nex3/sass/master/MIT-LICENSE' |
| 198 | ], [ | 198 | ], [ |
| @@ -11,4 +11,6 @@ · 10 unmodified lines | |||
| 11 | h3 { font-size: inherit; } | 11 | h3 { font-size: inherit; } |
| 12 | ul, pre { margin: 1em 0; } | 12 | ul, pre { margin: 1em 0; } |
| 13 | } | 13 | } |
| 14 | |||
| 15 | .tag_title { font-weight: bold; } | ||
| 14 | } | 16 | } |
| @@ -20,26 +20,31 @@ module Docs · 19 unmodified lines | |||
| 20 | 20 | ||
| 21 | css('.showSource', '.source_code').remove | 21 | css('.showSource', '.source_code').remove |
| 22 | 22 | ||
| 23 | css('div.docstring', 'div.discussion').each do |node| | ||
| 24 | node.before(node.children).remove | ||
| 25 | end | ||
| 26 | |||
| 23 | # Remove "See Also" | 27 | # Remove "See Also" |
| 24 | css('.see').each do |node| | 28 | css('.see').each do |node| |
| 25 | node.previous_element.remove | 29 | node.previous_element.remove |
| 26 | node.remove | 30 | node.remove |
| 27 | end | 31 | end |
| 28 | 32 | ||
| 29 | # Un-indent code blocks | 33 | # Remove "- ([...])" before method names |
| 30 | css('pre.example').each do |node| | 34 | css('.signature', 'span.overload', 'span.signature').each do |node| |
| 31 | node.inner_html = node.inner_html.strip_heredoc | 35 | next if node.at_css('.overload') |
| 36 | node.child.remove while node.child.name != 'strong' | ||
| 32 | end | 37 | end |
| 33 | 38 | ||
| 34 | # Remove "- " before method names | 39 | # Clean up .inline divs |
| 35 | css('.signature', 'span.overload').each do |node| | 40 | css('div.inline').each do |node| |
| 36 | node.child.content = node.child.content.sub(/\A\s*-\s*/, '') | 41 | node.content = node.content |
| 42 | node.name = 'span' | ||
| 37 | end | 43 | end |
| 38 | 44 | ||
| 39 | # Remove links to type classes (e.g. Number) | 45 | # Remove links to type classes (e.g. Number) |
| 40 | css('.type > code > a, .signature > code > a, span.overload > code > a').each do |node| | 46 | css('.type > code').each do |node| |
| 41 | node.before(node.content) | 47 | node.before(node.content.sub('Sass::Script::Value::', '').sub('Sass::Script::', '')).remove |
| 42 | node.remove | ||
| 43 | end | 48 | end |
| 44 | end | 49 | end |
| 45 | end | 50 | end |
| @@ -11,7 +11,7 @@ module Docs · 10 unmodified lines | |||
| 11 | '%foo' => '%placeholder selector', | 11 | '%foo' => '%placeholder selector', |
| 12 | '&' => '& parent selector', | 12 | '&' => '& parent selector', |
| 13 | '$' => '$ variables', | 13 | '$' => '$ variables', |
| 14 | '#{}' => '#{} interpolation', | 14 | '`' => '#{} interpolation', |
| 15 | 'The !optional Flag' => '!optional' | 15 | 'The !optional Flag' => '!optional' |
| 16 | } | 16 | } |
| 17 | 17 | ||
| @@ -35,7 +35,7 @@ module Docs · 17 unmodified lines | |||
| 35 | entries << ['@function', node['id'], '@-Rules and Directives'] | 35 | entries << ['@function', node['id'], '@-Rules and Directives'] |
| 36 | end | 36 | end |
| 37 | 37 | ||
| 38 | if type.end_with? 'Directives' | 38 | if type.include? 'Directives' |
| 39 | type = '@-Rules and Directives' | 39 | type = '@-Rules and Directives' |
| 40 | elsif type == 'Output Style' | 40 | elsif type == 'Output Style' |
| 41 | type = 'Output Styles' | 41 | type = 'Output Styles' |
| @@ -55,7 +55,7 @@ module Docs · 13 unmodified lines | |||
| 55 | name.gsub!(/ [A-Z]/) { |str| str.downcase! } | 55 | name.gsub!(/ [A-Z]/) { |str| str.downcase! } |
| 56 | 56 | ||
| 57 | if type == '@-Rules and Directives' | 57 | if type == '@-Rules and Directives' |
| 58 | next unless name =~ /\A@\w+\z/ || name == '!optional' | 58 | next unless name =~ /\A@[\w\-]+\z/ || name == '!optional' |
| 59 | end | 59 | end |
| 60 | 60 | ||
| 61 | entries << [name, node['id'], type] | 61 | entries << [name, node['id'], type] |
| @@ -1,24 +1,22 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Sass < UrlScraper | 2 | class Sass < UrlScraper |
| 3 | self.type = 'yard' | 3 | self.type = 'yard' |
| 4 | self.version = '3.2.12' | 4 | self.version = '3.3.0' |
| 5 | self.base_url = 'http://sass-lang.com/docs/yardoc/' | 5 | self.base_url = 'http://sass-lang.com/documentation/' |
| 6 | self.root_path = 'file.SASS_REFERENCE.html' | 6 | self.root_path = 'file.SASS_REFERENCE.html' |
| 7 | 7 | ||
| 8 | html_filters.push 'sass/clean_html', 'sass/entries', 'title' | 8 | html_filters.push 'sass/clean_html', 'sass/entries', 'title' |
| 9 | 9 | ||
| 10 | options[:only] = %w(Sass/Script/Functions.html) | 10 | options[:only] = %w(Sass/Script/Functions.html) |
| 11 | options[:root_title] = false | ||
| 12 | options[:title] = 'Sass Functions' | ||
| 11 | 13 | ||
| 12 | options[:container] = ->(filter) do | 14 | options[:container] = ->(filter) do |
| 13 | filter.root_page? ? '#filecontents' : '#instance_method_details' | 15 | filter.root_page? ? '#filecontents' : '#instance_method_details' |
| 14 | end | 16 | end |
| 15 | 17 | ||
| 16 | options[:title] = ->(filter) do | ||
| 17 | 'Sass Functions' if filter.slug == 'Sass/Script/Functions' | ||
| 18 | end | ||
| 19 | |||
| 20 | options[:attribution] = <<-HTML | 18 | options[:attribution] = <<-HTML |
| 21 | © 2006–2013 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br> | 19 | © 2006–2014 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein<br> |
| 22 | Licensed under the MIT License. | 20 | Licensed under the MIT License. |
| 23 | HTML | 21 | HTML |
| 24 | end | 22 | end |