diff --git a/ide/static/ide/js/compile.js b/ide/static/ide/js/compile.js index 26ab6846..451600e7 100644 --- a/ide/static/ide/js/compile.js +++ b/ide/static/ide/js/compile.js @@ -62,7 +62,7 @@ CloudPebble.Compile = (function() { log = log.replace(/^(src\/js\/.*)$/gm, '$1'); log = log.replace(/^(JavaScript linting failed.*)$/gm, '$1'); // Link the thingies. - log = log.replace(/([\/a-zA-Z0-9_]+\.[ch]):([0-9+]+)/g, '$1:$2'); + log = log.replace(/([\/.]*)([\/a-zA-Z0-9_.-]+\.[ch]):([0-9+]+)/g, '$1$2:$3'); log = '
' + log + '
'; log = $(log).css({'height': '100%', 'overflow': 'auto'}); // Make the links do something. @@ -366,7 +366,7 @@ CloudPebble.Compile = (function() { append_log_html($('
')); } else { var display = _.escape(get_log_label(log.priority) + ' ' + log.filename + ':' + log.line_number + ': ' + log.message); - display = display.replace(/([\/a-zA-Z0-9_]+\.[ch]):([0-9+]+)/, '$1:$2'); + display = display.replace(/([\/.]*)([\/a-zA-Z0-9_.-]+\.[ch]):([0-9+]+)/, '$1$2:$3'); var span = $('').addClass(get_log_class(log.priority)).addClass('log').html(display); span.find('.filename-link').click(function() { var thing = $(this);