Update Sass documentation (3.5.1)

pull/666/merge
Thibaut Courouble 7 years ago
parent f89c9aeda1
commit 3e0193cdea

@ -1,16 +1,5 @@
._yard {
> h2 { @extend %block-heading; }
.signature { @extend %block-label, %label-blue; }
> .method_details {
padding-left: 1rem;
> .signature { margin-left: -1rem; }
> .signature .overload { display: block; }
h3 { font-size: inherit; }
ul, pre { margin: 1em 0; }
}
@extend %simple;
.tag_title { font-weight: $boldFontWeight; }
}

@ -6,13 +6,17 @@ module Docs
node.name = 'code'
end
css('pre').each do |node|
node.content = node.content
end
root_page? ? root : other
doc
end
def root
at_css('.maruku_toc').remove
at_css('h1 + ul').remove
end
def other
@ -46,6 +50,14 @@ module Docs
css('.type > code').each do |node|
node.before(node.content.remove('Sass::Script::Value::').remove('Sass::Script::')).remove
end
css('li > span.signature').each do |node|
node.name = 'p'
end
css('h3 strong', 'span.overload').each do |node|
node.before(node.children).remove
end
end
end
end

@ -15,8 +15,12 @@ module Docs
'The !optional Flag' => '!optional'
}
def include_default_entry?
false
def get_name
'Functions'
end
def get_type
'Functions'
end
def additional_entries
@ -27,9 +31,11 @@ module Docs
entries = []
type = ''
css('> [id]').each do |node|
css('*').each do |node|
if node.name == 'h2'
type = node.content.strip
type.remove! %r{\s#.*}
node['id'] = type.parameterize
if type == 'Function Directives'
entries << ['@function', node['id'], '@-Rules and Directives']
@ -42,12 +48,14 @@ module Docs
end
next
end
elsif node.name == 'h3' || node.name == 'h4'
next unless TYPES.include?(type)
name = node.content.strip
name.remove! %r{\A.+?: }
name.remove! %r{\s#.*}
node['id'] = name.parameterize
next if SKIP_NAMES.include?(name)
@ -60,13 +68,14 @@ module Docs
entries << [name, node['id'], type]
end
end
entries
end
def function_entries
css('.method_details > .signature').inject [] do |entries, node|
name = node.at_css('strong').content.strip
name = node.content.strip.remove(%r{\(.*})
unless name == entries.last.try(:first)
entries << [name, node['id'], 'Functions']

@ -1,9 +1,13 @@
module Docs
class Sass < UrlScraper
self.type = 'yard'
self.release = '3.4.22'
self.release = '3.5.1'
self.base_url = 'http://sass-lang.com/documentation/'
self.root_path = 'file.SASS_REFERENCE.html'
self.links = {
home: 'http://sass-lang.com/',
code: 'https://github.com/sass/sass'
}
html_filters.push 'sass/clean_html', 'sass/entries', 'title'

Loading…
Cancel
Save