mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
Merge pull request #58 from mablo/codemirror-js-error
Fixed javascript error "b is null" in codemirror.js on line 1.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
$(function () {
|
||||
$('.dropdown-toggle').dropdown();
|
||||
var mode = $('#sourcecode').attr('language');
|
||||
|
||||
CodeMirror.fromTextArea(document.getElementById("sourcecode"), {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
lineWrapping: true,
|
||||
readOnly: true,
|
||||
mode: mode
|
||||
});
|
||||
});
|
||||
if ($('#sourcecode').length) {
|
||||
var mode = $('#sourcecode').attr('language');
|
||||
CodeMirror.fromTextArea(document.getElementById("sourcecode"), {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
lineWrapping: true,
|
||||
readOnly: true,
|
||||
mode: mode
|
||||
});
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user