瀏覽代碼

Add syntax highlighting to Groovy

Phil Scherer 5 年之前
父節點
當前提交
299f24a049
共有 1 個文件被更改,包括 4 次插入0 次删除
  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 }
           node.name = node.name.sub(/\d/) { |i| i.to_i - 1 }
         end
         end
 
 
+        css('pre').each do |node|
+          node['data-language'] = 'groovy'
+        end
+
         doc
         doc
       end
       end
     end
     end