Balance devdocs and Tailwind styles

pull/1711/head
Damilola Olowookere 4 years ago committed by IgnusG
parent 96add935bf
commit 773d23d604

File diff suppressed because it is too large Load Diff

@ -28,6 +28,30 @@ module Docs
node.remove
end
css('code.language-html').each do |node|
node.name = 'pre';
node['data-language'] = 'html'
node.parent.name = 'div';
node.parent['class'] = node.parent['class'].gsub(/bg-.*?\b/, ' ');
node.parent.parent['class'] = node.parent.parent['class'].gsub(/bg-.*?\b/, ' ');
end
css('code.language-diff').each do |node|
node.name = 'pre';
node['data-language'] = 'diff'
node.parent.name = 'div';
node.parent['class'] = node.parent['class'].gsub(/bg-.*?\b/, ' ');
node.parent.parent['class'] = node.parent.parent['class'].gsub(/bg-.*?\b/, ' ');
end
css('code.language-js').each do |node|
node.name = 'pre';
node['data-language'] = 'js'
node.parent.name = 'div';
node.parent['class'] = node.parent['class'].gsub(/bg-.*?\b/, ' ');
node.parent.parent['class'] = node.parent.parent['class'].gsub(/bg-.*?\b/, ' ');
end
doc
end

Loading…
Cancel
Save