[issue #195] Fixed syntax highlighting. Stub for rpm-specs
This commit is contained in:
parent
6522650c5a
commit
5290f0c712
|
@ -34,7 +34,7 @@
|
||||||
- when :text
|
- when :text
|
||||||
.gutter
|
.gutter
|
||||||
= render_line_numbers(text.length)
|
= render_line_numbers(text.length)
|
||||||
#output.formatted
|
#output.formatted.cm-s-default
|
||||||
%pre#code
|
%pre#code
|
||||||
=#{render_blob(@blob)}
|
=#{render_blob(@blob)}
|
||||||
:preserve
|
:preserve
|
||||||
|
@ -51,6 +51,6 @@
|
||||||
<br/>
|
<br/>
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var text = $('#code').innerHTML.replace(/&/gi, '&');
|
var text = $('#code').text().replace(/&/gi, '&');
|
||||||
CodeMirror.runMode(text, "#{@blob.mime_type}", document.getElementById("output"));
|
CodeMirror.runMode(text, "#{File.extname(@blob.name) == '.spec' ? 'text/x-rpm-spec' : @blob.mime_type}", document.getElementById("output"));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue