Sfoglia il codice sorgente

Add syntax highlighting to Groovy

Phil Scherer 5 anni fa
parent
commit
299f24a049
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      lib/docs/filters/groovy/clean_html.rb

+ 4 - 0
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