[devdocsgjs/main: 1309/1867] Fix 'notable traits' sections
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1309/1867] Fix 'notable traits' sections
- Date: Fri, 19 Nov 2021 23:47:53 +0000 (UTC)
commit 0a2493eca76f935dfa21119dddfde5e6560f733f
Author: MasterEnoc <brianhernandez222 hotmail com>
Date: Fri Nov 27 12:44:51 2020 -0600
Fix 'notable traits' sections
lib/docs/filters/rust/clean_html.rb | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/lib/docs/filters/rust/clean_html.rb b/lib/docs/filters/rust/clean_html.rb
index 682bf484..245ed701 100644
--- a/lib/docs/filters/rust/clean_html.rb
+++ b/lib/docs/filters/rust/clean_html.rb
@@ -27,6 +27,18 @@ module Docs
end
end
+ # Fix notable trait sections
+ css('.method, .rust.trait').each do |node|
+ traitSection = node.at_css('.notable-traits')
+
+ if traitSection
+ traitSectionContent = traitSection.css('.notable-traits-tooltiptext')
+ traitSection.css('.notable-traits-tooltip').remove
+ traitSection.add_child(traitSectionContent)
+ node.after(traitSection)
+ end
+ end
+
css('.rusttest', '.test-arrow', 'hr').remove
css('.docblock.attributes').each do |node|
@@ -88,20 +100,6 @@ module Docs
css('.collapse-toggle').remove
- # Fix how notable-traits sections are shown
-
- css('.method').each do |node|
- traitSection = node.at_css('.notable-traits')
-
- if traitSection
- traitSectionContent = traitSection.css('.notable-traits-tooltiptext')
- traitSection.css('.notable-traits-tooltip').remove
- traitSection.add_child(traitSectionContent)
- node.after(traitSection)
- end
-
- end
-
doc
end
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]