History

Update Sass documentation (1.82.9)

Simon Legner committed 1 year ago

Commit 7f333271 parent 9bdd8f63 files · +35 −12Browse files

Unified · Split

3 files
  1. assets/stylesheets/pages/_yard.scss +16 −1
  2. lib/docs/filters/sass/clean_html.rb +11 −7
  3. lib/docs/scrapers/sass.rb +8 −4
assets/stylesheets/pages/_yard.scss+16−1
@@ -1,5 +1,20 @@
11 ._yard {
22 @extend %simple;
33
4− .tag_title { font-weight: var(--boldFontWeight); }
4+ .tag_title {
5+ font-weight: var(--boldFontWeight);
6+ }
7+
8+ .sl-c-description-list--horizontal * {
9+ display: inline-block;
10+ padding: 0;
11+ margin: 0;
12+ dt {
13+ margin-left: 1rem;
14+ }
15+ }
16+
17+ .sl-c-callout--warning {
18+ @extend %note, %note-orange;
19+ }
520 }
lib/docs/filters/sass/clean_html.rb+11−7
@@ -5,14 +5,13 @@ module Docs · 4 unmodified lines
55 @doc = at_css('#main-content .typedoc', '#main-content')
66
77 css('.sl-c-alert').remove
8−
98 css('.sl-l-medium-holy-grail__navigation').remove
10−
119 css('.sl-r-banner').remove
12−
1310 css('.site-footer').remove
14−
1511 css('.tsd-breadcrumb').remove
12+ css('.sl-c-callout--warning > h3').remove
13+ css('.ui-tabs-nav').remove
14+ css('.sl-c-to-playground').remove
1615
1716 # Add id to code blocks
1817 css('pre.signature').each do |node|
@@ -42,14 +41,19 @@ module Docs · 23 unmodified lines
4241 css('.visuallyhidden').remove
4342
4443 ### Syntax Highlight ###
45− css('.highlight.scss', '.highlight.sass').each do |node|
44+ css('.language-scss').each do |node|
4645 node['data-language'] = 'scss'
4746 node.content = node.content.strip
4847 end
4948
50− css('.highlight.css').each do |node|
49+ css('.language-sass').each do |node|
50+ node['data-language'] = 'sass'
51+ node.content = "// SASS\n#{node.content.strip}"
52+ end
53+
54+ css('.language-css').each do |node|
5155 node['data-language'] = 'css'
52− node.content = node.content.strip
56+ node.content = "/* CSS */\n#{node.content.strip}"
5357 end
5458
5559 doc
lib/docs/scrapers/sass.rb+8−4
@@ -1,7 +1,7 @@
11 module Docs
22 class Sass < UrlScraper
33 self.type = 'yard'
4− self.release = '1.56.1'
4+ self.release = '1.82.9'
55 self.base_url = 'https://sass-lang.com/documentation'
66 self.root_path = 'index.html'
77 self.links = {
@@ -14,17 +14,21 @@ module Docs · 6 unmodified lines
1414 options[:root_title] = false
1515
1616 options[:skip_patterns] = [/breaking-changes/]
17−
18− # options[:container] = '#main-content'
17+ options[:trailing_slash] = false
1918
2019 options[:attribution] = <<-HTML
21− &copy; 2006&ndash;2022 the Sass team, and numerous contributors<br>
20+ &copy; 2006&ndash;2024 the Sass team, and numerous contributors<br>
2221 Licensed under the MIT License.
2322 HTML
23+
24+ private
2425
2526 def get_latest_version(opts)
2627 get_npm_version('sass', opts)
2728 end
2829
30+ def parse(response)
31+ response.body.gsub! '<span class="widont">&nbsp;</span>', '&nbsp;'
32+ end
2933 end
3034 end