From 299f24a04902c8f9ec127e3289a90259f9e4743e Mon Sep 17 00:00:00 2001 From: Phil Scherer Date: Fri, 4 Dec 2020 16:00:36 +0000 Subject: [PATCH] Add syntax highlighting to Groovy --- lib/docs/filters/groovy/clean_html.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/docs/filters/groovy/clean_html.rb b/lib/docs/filters/groovy/clean_html.rb index c08e8044..baf88527 100755 --- a/lib/docs/filters/groovy/clean_html.rb +++ b/lib/docs/filters/groovy/clean_html.rb @@ -86,6 +86,10 @@ module Docs node.name = node.name.sub(/\d/) { |i| i.to_i - 1 } end + css('pre').each do |node| + node['data-language'] = 'groovy' + end + doc end end