History

Improve point_cloud_library clean_html

Aditya Ardiya committed 4 years ago

Commit 20445fd1 parent 83f20541 file · +12 −0Browse files

Unified · Split

lib/docs/filters/point_cloud_library/clean_html.rb+12−0
@@ -5,6 +5,18 @@ module Docs · 4 unmodified lines
55 @doc = at_css('.contents')
66 css('.dynheader.closed').remove
77 css('.permalink').remove
8+ css('.memSeparator').remove
9+
10+ # Change div.fragment to C++ code with syntax highlight
11+ css('div.fragment').each do |node|
12+ node.name = 'pre'
13+ node['data-language'] = 'cpp'
14+ node_content = ""
15+ node.css('div').each do |inner_node|
16+ node_content += inner_node.text + "\n"
17+ end
18+ node.content = node_content
19+ end
820 doc
921 end
1022 end