History

Syntax highlighting in Git docs

Jed Fox committed 6 years ago

Commit bad02f81 parent 7d04a301 file · +2 −0Browse files

Unified · Split

lib/docs/filters/git/clean_html.rb+2−0
@@ -42,6 +42,8 @@ module Docs · 41 unmodified lines
4242
4343 css('pre').each do |node|
4444 node.content = node.content.gsub("\t", ' ' * 8)
45+ node['data-language'] = 'shell' if node.content.starts_with?('git ')
46+ node['data-language'] = 'shell-session' if node.content[0] == '$'
4547 end
4648 end
4749 end