浏览代码

yarn: clean all styles

Simon Legner 4 年之前
父节点
当前提交
07279d6aae
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lib/docs/filters/yarn/clean_html_berry.rb

+ 4 - 1
lib/docs/filters/yarn/clean_html_berry.rb

@@ -34,10 +34,13 @@ module Docs
         if slug.start_with?('configuration')
         if slug.start_with?('configuration')
           css('h1', 'h2').each do |node|
           css('h1', 'h2').each do |node|
             node.name = node.name.sub(/\d/) { |i| i.to_i + 1 }
             node.name = node.name.sub(/\d/) { |i| i.to_i + 1 }
-            node.remove_attribute('style')
           end
           end
         end
         end
 
 
+        css('*').each do |node|
+          node.remove_attribute('style')
+        end
+
         doc
         doc
       end
       end
     end
     end