Skip to content

Commit e68269b

Browse files
committed
Fix Cordova indents with new option
1 parent 887c879 commit e68269b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/docs/filters/core/clean_html.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def call
88
xpath('./text()', './/text()[not(ancestor::pre) and not(ancestor::code) and not(ancestor::div[contains(concat(" ", normalize-space(@class), " "), " prism ")])]').each do |node|
99
content = node.content
1010
next unless content.valid_encoding?
11+
next if context[:clean_html_maintain_nbsp] && !content.index(" ").nil?
1112
content.gsub! %r{[[:space:]]+}, ' '
1213
node.content = content
1314
end

lib/docs/scrapers/cordova.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class Cordova < UrlScraper
1111
html_filters.push 'cordova/entries', 'cordova/clean_html'
1212

1313
options[:container] = '.docs'
14+
options[:clean_html_maintain_nbsp] = true
1415
options[:skip] = %w(index.html)
1516

1617
options[:fix_urls] = ->(url) do

0 commit comments

Comments
 (0)