Browse Source

[django] Clean up the multi-platform console blocks

Jed Fox 5 years ago
parent
commit
cb790e95ab
1 changed files with 8 additions and 0 deletions
  1. 8 0
      lib/docs/filters/django/clean_html.rb

+ 8 - 0
lib/docs/filters/django/clean_html.rb

@@ -4,6 +4,14 @@ module Docs
       def call
         @doc = at_css('.yui-g')
 
+        css('.console-block').each do |node|
+          node.css('input', 'label').remove
+          node.css('section').each do |sec|
+            sec.before(sec.children).remove
+          end
+          node.before(node.children).remove
+        end
+
         doc
       end
     end