[devdocsgjs/main: 957/1867] Add syntax highlighting to source files




commit 0631b3f7e9bef733216fe9023436de637e77a2fb
Author: Waldir Pimenta <waldyrious gmail com>
Date:   Sun Oct 13 00:28:47 2019 +0100

    Add syntax highlighting to source files

 lib/docs/filters/sequelize/clean_html.rb | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/lib/docs/filters/sequelize/clean_html.rb b/lib/docs/filters/sequelize/clean_html.rb
index ee9246ab..269e28ff 100644
--- a/lib/docs/filters/sequelize/clean_html.rb
+++ b/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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]