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 @@
1._yard {1._yard {
2 @extend %simple;2 @extend %simple;
3 3
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 }
5}20}
lib/docs/filters/sass/clean_html.rb+11−7
@@ -5,14 +5,13 @@ module Docs · 4 unmodified lines
5 @doc = at_css('#main-content .typedoc', '#main-content')5 @doc = at_css('#main-content .typedoc', '#main-content')
6 6
7 css('.sl-c-alert').remove7 css('.sl-c-alert').remove
8
9 css('.sl-l-medium-holy-grail__navigation').remove8 css('.sl-l-medium-holy-grail__navigation').remove
10
11 css('.sl-r-banner').remove9 css('.sl-r-banner').remove
12
13 css('.site-footer').remove10 css('.site-footer').remove
14
15 css('.tsd-breadcrumb').remove11 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
16 15
17 # Add id to code blocks16 # Add id to code blocks
18 css('pre.signature').each do |node|17 css('pre.signature').each do |node|
@@ -42,14 +41,19 @@ module Docs · 23 unmodified lines
42 css('.visuallyhidden').remove41 css('.visuallyhidden').remove
43 42
44 ### Syntax Highlight ###43 ### Syntax Highlight ###
45 css('.highlight.scss', '.highlight.sass').each do |node|44 css('.language-scss').each do |node|
46 node['data-language'] = 'scss'45 node['data-language'] = 'scss'
47 node.content = node.content.strip46 node.content = node.content.strip
48 end47 end
49 48
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|
51 node['data-language'] = 'css'55 node['data-language'] = 'css'
52 node.content = node.content.strip56 node.content = "/* CSS */\n#{node.content.strip}"
53 end57 end
54 58
55 doc59 doc
lib/docs/scrapers/sass.rb+8−4
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Sass < UrlScraper2 class Sass < UrlScraper
3 self.type = 'yard'3 self.type = 'yard'
4 self.release = '1.56.1'4 self.release = '1.82.9'
5 self.base_url = 'https://sass-lang.com/documentation'5 self.base_url = 'https://sass-lang.com/documentation'
6 self.root_path = 'index.html'6 self.root_path = 'index.html'
7 self.links = {7 self.links = {
@@ -14,17 +14,21 @@ module Docs · 6 unmodified lines
14 options[:root_title] = false14 options[:root_title] = false
15 15
16 options[:skip_patterns] = [/breaking-changes/]16 options[:skip_patterns] = [/breaking-changes/]
17 17 options[:trailing_slash] = false
18 # options[:container] = '#main-content'
19 18
20 options[:attribution] = <<-HTML19 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>
22 Licensed under the MIT License.21 Licensed under the MIT License.
23 HTML22 HTML
23
24 private
24 25
25 def get_latest_version(opts)26 def get_latest_version(opts)
26 get_npm_version('sass', opts)27 get_npm_version('sass', opts)
27 end28 end
28 29
30 def parse(response)
31 response.body.gsub! '<span class="widont">&nbsp;</span>', '&nbsp;'
32 end
29 end33 end
30end34end