|
|
@ -392,8 +392,9 @@ THE SOFTWARE. |
|
|
|
var detailsOpen = {}; |
|
|
|
var detailsOpen = {}; |
|
|
|
|
|
|
|
|
|
|
|
var renderError = function(message) { |
|
|
|
var renderError = function(message) { |
|
|
|
|
|
|
|
var type = message.match(/^[0-9:]* Warning: /) ? 'warning' : 'error'; |
|
|
|
$('#output') |
|
|
|
$('#output') |
|
|
|
.append($('<pre class="error"></pre>').text(message)); |
|
|
|
.append($('<pre class="' + type + '"></pre>').text(message)); |
|
|
|
var err = message.match(/^:([0-9]*):([0-9]*)/) |
|
|
|
var err = message.match(/^:([0-9]*):([0-9]*)/) |
|
|
|
if (err && err.length) { |
|
|
|
if (err && err.length) { |
|
|
|
var errLine = parseInt(err[1], 10) - 1; |
|
|
|
var errLine = parseInt(err[1], 10) - 1; |
|
|
@ -402,7 +403,7 @@ THE SOFTWARE. |
|
|
|
row: errLine, |
|
|
|
row: errLine, |
|
|
|
column: errCol, |
|
|
|
column: errCol, |
|
|
|
text: message, |
|
|
|
text: message, |
|
|
|
type: "error" |
|
|
|
type: type |
|
|
|
}; |
|
|
|
}; |
|
|
|
editor.getSession().setAnnotations(sourceAnnotations); |
|
|
|
editor.getSession().setAnnotations(sourceAnnotations); |
|
|
|
} |
|
|
|
} |
|
|
|