[devdocsgjs/main: 1250/1867] typescript: clean code blocks
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1250/1867] typescript: clean code blocks
- Date: Fri, 19 Nov 2021 23:47:51 +0000 (UTC)
commit 87f97d6cc0e9a6860cee78b4ac8b40940b80138d
Author: Simon Legner <Simon Legner gmail com>
Date: Thu Nov 19 20:41:43 2020 +0100
typescript: clean code blocks
assets/javascripts/templates/pages/about_tmpl.coffee | 2 +-
lib/docs/filters/typescript/clean_html.rb | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee
b/assets/javascripts/templates/pages/about_tmpl.coffee
index 0c10bb48..1390f67e 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -783,7 +783,7 @@ credits = [
'https://twig.symfony.com/license'
], [
'TypeScript',
- '2012-2019 Microsoft',
+ '2012-2020 Microsoft',
'Apache',
'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE'
], [
diff --git a/lib/docs/filters/typescript/clean_html.rb b/lib/docs/filters/typescript/clean_html.rb
index 1fbb0c74..49d4a89f 100644
--- a/lib/docs/filters/typescript/clean_html.rb
+++ b/lib/docs/filters/typescript/clean_html.rb
@@ -17,6 +17,13 @@ module Docs
node.name = 'h1'
end
+ css('a:contains("Try")').remove
+ css('pre').each do |node|
+ node.content = node.content
+ node['data-language'] = 'typescript'
+ node.remove_attribute('class')
+ end
+
# 'Next' title area
css('.whitespace-tight').remove
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]