Syntax highlighting in Git docs

pull/1173/head
Jed Fox 5 years ago
parent 7d04a3080d
commit bad02f87ba

@ -42,6 +42,8 @@ module Docs
css('pre').each do |node| css('pre').each do |node|
node.content = node.content.gsub("\t", ' ' * 8) node.content = node.content.gsub("\t", ' ' * 8)
node['data-language'] = 'shell' if node.content.starts_with?('git ')
node['data-language'] = 'shell-session' if node.content[0] == '$'
end end
end end
end end

Loading…
Cancel
Save