mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-09-29 05:36:48 +02:00
Don't strip whitespace in prism.js divs
This commit is contained in:
parent
c69136056e
commit
ec9e755102
1 changed files with 1 additions and 1 deletions
|
@ -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:]]+}, ' '
|
||||
|
|
Loading…
Reference in a new issue