Unified · Split
| @@ -27,6 +27,18 @@ module Docs · 26 unmodified lines | ||
| 27 | 27 | end |
| 28 | 28 | 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 | 42 | css('.rusttest', '.test-arrow', 'hr').remove |
| 31 | 43 | |
| 32 | 44 | css('.docblock.attributes').each do |node| |
| @@ -88,20 +100,6 @@ module Docs · 55 unmodified lines | ||
| 88 | 100 | |
| 89 | 101 | 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 | 103 | doc |
| 106 | 104 | end |
| 107 | 105 | end |