update jslint demo

This commit is contained in:
Fabian Jakobs 2011-01-22 23:58:03 +01:00
commit 2a65f1266f
2 changed files with 11 additions and 8 deletions

View file

@ -79,17 +79,20 @@ exports.launch = function(env) {
});
worker.on("jslint", function(results) {
console.log("jslint", results);
var rows = [];
var errors = [];
for (var i=0; i<results.data.length; i++) {
var error = results.data[i];
if (error)
rows.push(error.line-1);
errors.push({
row: error.line-1,
column: error.character-1,
text: error.reason,
type: "error",
lint: error
})
}
docs.js.clearBreakpoints();
docs.js.setBreakpoints(rows)
docs.js.setAnnotations(errors)
});
window.mirror = function() {

View file

@ -19,7 +19,7 @@
height: 100%;
}
.ace_gutter-cell.ace_breakpoint {
.ace_gutter-cell.ace_error {
color: red;
}