History

Fix 'notable traits' sections

MasterEnoc committed 5 years ago

Commit 0a2493e1 parent c5f7de61 file · +12 −14Browse files

Unified · Split

lib/docs/filters/rust/clean_html.rb+12−14
@@ -27,6 +27,18 @@ module Docs · 26 unmodified lines
27 end27 end
28 end28 end
29 29
30 # Fix notable trait sections
31 css('.method, .rust.trait').each do |node|
32 traitSection = node.at_css('.notable-traits')
33
34 if traitSection
35 traitSectionContent = traitSection.css('.notable-traits-tooltiptext')
36 traitSection.css('.notable-traits-tooltip').remove
37 traitSection.add_child(traitSectionContent)
38 node.after(traitSection)
39 end
40 end
41
30 css('.rusttest', '.test-arrow', 'hr').remove42 css('.rusttest', '.test-arrow', 'hr').remove
31 43
32 css('.docblock.attributes').each do |node|44 css('.docblock.attributes').each do |node|
@@ -88,20 +100,6 @@ module Docs · 55 unmodified lines
88 100
89 css('.collapse-toggle').remove101 css('.collapse-toggle').remove
90 102
91 # Fix how notable-traits sections are shown
92
93 css('.method').each do |node|
94 traitSection = node.at_css('.notable-traits')
95
96 if traitSection
97 traitSectionContent = traitSection.css('.notable-traits-tooltiptext')
98 traitSection.css('.notable-traits-tooltip').remove
99 traitSection.add_child(traitSectionContent)
100 node.after(traitSection)
101 end
102
103 end
104
105 doc103 doc
106 end104 end
107 end105 end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t