Skip to content

Commit 1da0de9

Browse files
authored
Merge pull request #2341 from thewheat/fix-cordova-indents
Fix Cordova indents with new clean html option
2 parents 002eb72 + 63dd3dc commit 1da0de9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Docs
2+
class Cordova
3+
class CleanHtmlCoreFilter < Filter
4+
def call
5+
css('script', 'style', 'link').remove
6+
xpath('descendant::comment()').remove
7+
doc
8+
end
9+
end
10+
end
11+
end

lib/docs/scrapers/cordova.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class Cordova < UrlScraper
88
code: 'https://github.com/apache/cordova'
99
}
1010

11+
html_filters.replace 'clean_html', 'cordova/clean_html_core'
1112
html_filters.push 'cordova/entries', 'cordova/clean_html'
1213

1314
options[:container] = '.docs'

0 commit comments

Comments
 (0)