Unified · Split
| @@ -3,7 +3,7 @@ module Docs · 2 unmodified lines | |||
| 3 | def call | 3 | def call |
| 4 | css('script', 'style').remove | 4 | css('script', 'style').remove |
| 5 | xpath('descendant::comment()').remove | 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 | content = node.content | 7 | content = node.content |
| 8 | next unless content.valid_encoding? | 8 | next unless content.valid_encoding? |
| 9 | content.gsub! %r{[[:space:]]+}, ' ' | 9 | content.gsub! %r{[[:space:]]+}, ' ' |