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