Balance devdocs and Tailwind styles

This commit is contained in:
Damilola Olowookere 2021-04-16 14:15:14 +01:00 committed by IgnusG
parent 96add935bf
commit 773d23d604
2 changed files with 9427 additions and 137031 deletions

File diff suppressed because it is too large Load diff

View file

@ -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