You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/lib/docs/scrapers/sass.rb

35 lines
833 B

11 years ago
module Docs
class Sass < UrlScraper
self.type = 'yard'
self.release = '1.82.9'
self.base_url = 'https://sass-lang.com/documentation'
self.root_path = 'index.html'
self.links = {
home: 'http://sass-lang.com/',
code: 'https://github.com/sass/sass'
}
11 years ago
html_filters.push 'sass/entries', 'sass/clean_html'
11 years ago
options[:root_title] = false
11 years ago
options[:skip_patterns] = [/breaking-changes/]
options[:trailing_slash] = false
11 years ago
options[:attribution] = <<-HTML
&copy; 2006&ndash;2024 the Sass team, and numerous contributors<br>
11 years ago
Licensed under the MIT License.
HTML
private
def get_latest_version(opts)
get_npm_version('sass', opts)
end
def parse(response)
response.body.gsub! '<span class="widont">&nbsp;</span>', '&nbsp;'
end
11 years ago
end
end