Don't strip whitespace in prism.js divs

This commit is contained in:
Thibaut 2015-08-08 12:48:46 -04:00
parent c69136056e
commit ec9e755102

View file

@ -3,7 +3,7 @@ module Docs
def call
css('script', 'style').remove
xpath('descendant::comment()').remove
xpath('./text()', './/text()[not(ancestor::pre) and not(ancestor::code)]').each do |node|
xpath('./text()', './/text()[not(ancestor::pre) and not(ancestor::code) and not(ancestor::div[contains(concat(" ", normalize-space(@class), " "), " prism ")])]').each do |node|
content = node.content
next unless content.valid_encoding?
content.gsub! %r{[[:space:]]+}, ' '