Explorar el Código

Add syntax highlighting to source files

Waldir Pimenta hace 6 años
padre
commit
0631b3f7e9
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      lib/docs/filters/sequelize/clean_html.rb

+ 5 - 0
lib/docs/filters/sequelize/clean_html.rb

@@ -25,6 +25,11 @@ module Docs
           pre['data-language'] = 'typescript' if node['class'] == 'lang-ts'
         end
 
+        # Add syntax highlighting to source files
+        css('pre.raw-source-code').each do |node|
+          node['data-language'] = 'javascript'
+        end
+
         # Return the cleaned-up document
         doc
       end