We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56879c3 commit 3f6c4d4Copy full SHA for 3f6c4d4
1 file changed
lib/docs/filters/opentofu/clean_html.rb
@@ -3,9 +3,10 @@ class Opentofu
3
class CleanHtmlFilter < Filter
4
def fix_syntax_highlight
5
css('pre').each do |node|
6
+ node['data-language'] = node['class'][/language-(\w+)/, 1] if node['class']
7
+ node.content = node.css('.token-line').map(&:content).join("\n")
8
node.remove_attribute('class')
9
node.remove_attribute('style')
- node.css('.token-line').remove_attribute('style')
10
end
11
12
css('[class*="buttonGroup_"]').remove
0 commit comments