Explorar el Código

Remove unnecessary `onclick` attributes in Rust docs

Calum Smith hace 3 meses
padre
commit
d777a8a3fb
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      lib/docs/filters/rust/clean_html.rb

+ 4 - 0
lib/docs/filters/rust/clean_html.rb

@@ -65,6 +65,10 @@ module Docs
             node.add_child(next_element)
           end
 
+          node.css('[onclick="show_railroad()"]').each do |subnode|
+            subnode.remove_attribute('onclick')
+          end
+
           # We changed this to a <pre> in parse(), changing it back here
           node.name = 'div'
           node.css('.grammar-literal').each do |literal|