diff --git a/lib/docs/filters/eigen3/clean_html.rb b/lib/docs/filters/eigen3/clean_html.rb index 21c2a1e2..0542507e 100644 --- a/lib/docs/filters/eigen3/clean_html.rb +++ b/lib/docs/filters/eigen3/clean_html.rb @@ -4,14 +4,6 @@ module Docs def call @doc = at_css('#doc-content') - - css("div.fragment").each do |node| - node.css("div.line").each do |node| - node.replace(node.inner_html + "\n") - end - node.replace("
" + node.inner_html + "
") - end - css('#MSearchSelectWindow').remove css('#MSearchResultsWindow').remove css('.directory .levels').remove @@ -20,6 +12,16 @@ module Docs css('.top').remove css('.dynheader.closed').remove css('.permalink').remove + + css("div.fragment").each do |node| + node.name = 'pre' + node['data-language'] = 'cpp' + node_content = "" + node.css('div').each do |inner_node| + node_content += inner_node.text + "\n" + end + node.content = node_content + end doc end end