Skip to content

Commit e12068f

Browse files
committed
Update TypeScript documentation (4.3.2)
1 parent fb5e608 commit e12068f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

lib/docs/filters/typescript/clean_html.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ def other
3030
@doc = at_css('article > .whitespace > .markdown')
3131
doc.child.before(deprecated) if deprecated
3232
else # tsconfig page
33-
@doc = at_css('.markdown > div')
34-
35-
at_css('h2').remove
3633
end
3734

3835
css('.anchor', 'a:contains("Try")', 'h2 a', 'h3 a', 'svg', '#full-option-list').remove
3936

37+
# tsconfig page
38+
css('.markdown', '.compiler-option', '.compiler-option-md', '.compiler-content').each do |node|
39+
node.remove_attribute('class')
40+
end
41+
4042
css('pre').each do |node|
4143
language = node.at_css('.language-id') ? node.at_css('.language-id').content : 'typescript'
4244
node.css('.language-id').remove

lib/docs/filters/typescript/entries.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class EntriesFilter < Docs::EntriesFilter
1414
)
1515

1616
def get_name
17+
return 'TSConfig Reference' if slug == 'tsconfig'
1718
at_css('h1') ? at_css('h1').content : at_css('h2').content
1819
end
1920

@@ -27,6 +28,7 @@ def get_type
2728

2829
def additional_entries
2930
return [] if DEPRECATED_PAGES.include? slug
31+
return [] if slug == 'tsconfig-json'
3032
base_url.path == '/' ? tsconfig_entries : handbook_entries
3133
end
3234

lib/docs/scrapers/typescript.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Typescript < UrlScraper
44

55
self.name = 'TypeScript'
66
self.type = 'typescript'
7-
self.release = '4.2.3'
7+
self.release = '4.3.2'
88
self.base_urls = [
99
'https://www.typescriptlang.org/docs/handbook/',
1010
'https://www.typescriptlang.org/'
@@ -30,6 +30,7 @@ def initial_urls
3030

3131
options[:skip_patterns] = [
3232
/release-notes/,
33+
/dt\/search/,
3334
/play\//
3435
]
3536

0 commit comments

Comments
 (0)