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) { worker.on("jslint", function(results) {
console.log("jslint", results); var errors = [];
var rows = [];
for (var i=0; i<results.data.length; i++) { for (var i=0; i<results.data.length; i++) {
var error = results.data[i]; var error = results.data[i];
if (error) 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.setAnnotations(errors)
docs.js.setBreakpoints(rows)
}); });
window.mirror = function() { window.mirror = function() {

View file

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