[issue #195] Fixed syntax highlighting. Stub for rpm-specs

This commit is contained in:
George Vinogradov 2012-03-05 19:27:16 +04:00
parent 6522650c5a
commit 5290f0c712
1 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@
- when :text
.gutter
= render_line_numbers(text.length)
#output.formatted
#output.formatted.cm-s-default
%pre#code
=#{render_blob(@blob)}
:preserve
@ -51,6 +51,6 @@
<br/>
:javascript
$(document).ready(function() {
var text = $('#code').innerHTML.replace(/&amp;/gi, '&');
CodeMirror.runMode(text, "#{@blob.mime_type}", document.getElementById("output"));
var text = $('#code').text().replace(/&amp;/gi, '&');
CodeMirror.runMode(text, "#{File.extname(@blob.name) == '.spec' ? 'text/x-rpm-spec' : @blob.mime_type}", document.getElementById("output"));
});