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
5 @doc = at_css('.contents')5 @doc = at_css('.contents')
6 css('.dynheader.closed').remove6 css('.dynheader.closed').remove
7 css('.permalink').remove7 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
8 doc20 doc
9 end21 end
10 end22 end