mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-09-29 05:36:48 +02:00
Balance devdocs and Tailwind styles
This commit is contained in:
parent
96add935bf
commit
773d23d604
2 changed files with 9427 additions and 137031 deletions
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…
Reference in a new issue