Skip to content

Commit d777a8a

Browse files
committed
Remove unnecessary onclick attributes in Rust docs
1 parent 97f7b5a commit d777a8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/docs/filters/rust/clean_html.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def call
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|

0 commit comments

Comments
 (0)