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
65 node.add_child(next_element)65 node.add_child(next_element)
66 end66 end
67 67
68 node.css('[onclick="show_railroad()"]').each do |subnode|
69 subnode.remove_attribute('onclick')
70 end
71
68 # We changed this to a <pre> in parse(), changing it back here72 # We changed this to a <pre> in parse(), changing it back here
69 node.name = 'div'73 node.name = 'div'
70 node.css('.grammar-literal').each do |literal|74 node.css('.grammar-literal').each do |literal|