|
|
@ -3,11 +3,13 @@ module Docs
|
|
|
|
class CleanHtmlFilter < Filter
|
|
|
|
class CleanHtmlFilter < Filter
|
|
|
|
def call
|
|
|
|
def call
|
|
|
|
css('#demo, #contributors ~ div, #contributors, #changelog ~ div, #changelog').remove
|
|
|
|
css('#demo, #contributors ~ div, #contributors, #changelog ~ div, #changelog').remove
|
|
|
|
|
|
|
|
css('span.lang').remove
|
|
|
|
|
|
|
|
css('pre.vp-code-dark').remove
|
|
|
|
|
|
|
|
|
|
|
|
css('.grid').each do |table|
|
|
|
|
css('.grid').each do |table|
|
|
|
|
table.name = 'table'
|
|
|
|
table.name = 'table'
|
|
|
|
tr = nil
|
|
|
|
tr = nil
|
|
|
|
table.children.each do |td|
|
|
|
|
table.css('> div').each do |td|
|
|
|
|
if td['opacity']
|
|
|
|
if td['opacity']
|
|
|
|
table.add_child('<tr>')
|
|
|
|
table.add_child('<tr>')
|
|
|
|
tr = table.last_element_child
|
|
|
|
tr = table.last_element_child
|
|
|
|