|
|
|
@ -2,19 +2,16 @@ module Docs
|
|
|
|
|
class Socketio
|
|
|
|
|
class CleanHtmlFilter < Filter
|
|
|
|
|
def call
|
|
|
|
|
@doc = at_css('article')
|
|
|
|
|
|
|
|
|
|
css('p > br').each do |node|
|
|
|
|
|
node.remove unless node.next.content =~ /\s*\-/
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# version documentation message
|
|
|
|
|
css('.warning').remove
|
|
|
|
|
at_css('.warning').remove
|
|
|
|
|
|
|
|
|
|
css('header').remove
|
|
|
|
|
|
|
|
|
|
css('aside').remove
|
|
|
|
|
|
|
|
|
|
css('footer').remove
|
|
|
|
|
css('header', 'footer', 'aside').remove
|
|
|
|
|
|
|
|
|
|
css('pre').each do |node|
|
|
|
|
|
node.content = node.content
|
|
|
|
|