Просмотр исходного кода

Merge pull request #2341 from thewheat/fix-cordova-indents

Fix Cordova indents with new clean html option
Simon Legner 1 год назад
Родитель
Сommit
1da0de920a
2 измененных файлов с 12 добавлено и 0 удалено
  1. 11 0
      lib/docs/filters/cordova/clean_html_core.rb
  2. 1 0
      lib/docs/scrapers/cordova.rb

+ 11 - 0
lib/docs/filters/cordova/clean_html_core.rb

@@ -0,0 +1,11 @@
+module Docs
+  class Cordova
+    class CleanHtmlCoreFilter < Filter
+      def call
+        css('script', 'style', 'link').remove
+        xpath('descendant::comment()').remove
+        doc
+      end
+    end
+  end
+end

+ 1 - 0
lib/docs/scrapers/cordova.rb

@@ -8,6 +8,7 @@ module Docs
       code: 'https://github.com/apache/cordova'
     }
 
+    html_filters.replace 'clean_html', 'cordova/clean_html_core'
     html_filters.push 'cordova/entries', 'cordova/clean_html'
 
     options[:container] = '.docs'