History

Add syntax highlighting to source files

Waldir Pimenta committed 7 years ago

Commit 0631b3f1 parent 2bdf3a01 file · +5 −0Browse files

Unified · Split

lib/docs/filters/sequelize/clean_html.rb+5−0
@@ -25,6 +25,11 @@ module Docs · 24 unmodified lines
2525 pre['data-language'] = 'typescript' if node['class'] == 'lang-ts'
2626 end
2727
28+ # Add syntax highlighting to source files
29+ css('pre.raw-source-code').each do |node|
30+ node['data-language'] = 'javascript'
31+ end
32+
2833 # Return the cleaned-up document
2934 doc
3035 end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t