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