Merge pull request #1389 from MasterEnoc/rust

Fix 'notable traits' sections
pull/1392/head
Simon Legner 4 years ago committed by GitHub
commit 3ff6e4e8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save