History

Merge pull request #1389 from MasterEnoc/rust

Fix 'notable traits' sections

Simon Legner committed 5 years ago

Commit 3ff6e4e2 parents bf8c8fe 0a2493e1 file · +12 −14Browse files

Unified · Split

lib/docs/filters/rust/clean_html.rb+12−14
@@ -27,6 +27,18 @@ module Docs · 26 unmodified lines
2727 end
2828 end
2929
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+
3042 css('.rusttest', '.test-arrow', 'hr').remove
3143
3244 css('.docblock.attributes').each do |node|
@@ -88,20 +100,6 @@ module Docs · 55 unmodified lines
88100
89101 css('.collapse-toggle').remove
90102
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−
105103 doc
106104 end
107105 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