sass.rb 831 B

12345678910111213141516171819202122232425262728293031323334
  1. module Docs
  2. class Sass < UrlScraper
  3. self.type = 'yard'
  4. self.release = '1.89.1'
  5. self.base_url = 'https://sass-lang.com/documentation'
  6. self.root_path = 'index.html'
  7. self.links = {
  8. home: 'http://sass-lang.com/',
  9. code: 'https://github.com/sass/sass'
  10. }
  11. html_filters.push 'sass/entries', 'sass/clean_html'
  12. options[:root_title] = false
  13. options[:skip_patterns] = [/breaking-changes/]
  14. options[:trailing_slash] = false
  15. options[:attribution] = <<-HTML
  16. &copy; 2006&ndash;2025 the Sass team, and numerous contributors<br>
  17. Licensed under the MIT License.
  18. HTML
  19. def get_latest_version(opts)
  20. get_npm_version('sass', opts)
  21. end
  22. private
  23. def parse(response)
  24. response.body.gsub! '<span class="widont">&nbsp;</span>', '&nbsp;'
  25. end
  26. end
  27. end