History

Remove unnecessary `onclick` attributes in Rust docs

Calum Smith committed 1 year ago

Commit d777a8a1 parent 97f7b5a1 file · +4 −0Browse files

Unified · Split

lib/docs/filters/rust/clean_html.rb+4−0
@@ -65,6 +65,10 @@ module Docs · 64 unmodified lines
6565 node.add_child(next_element)
6666 end
6767
68+ node.css('[onclick="show_railroad()"]').each do |subnode|
69+ subnode.remove_attribute('onclick')
70+ end
71+
6872 # We changed this to a <pre> in parse(), changing it back here
6973 node.name = 'div'
7074 node.css('.grammar-literal').each do |literal|