File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ function initCodeworld() {
388
388
389
389
if ( request . status === 400 || request . status === 200 ) {
390
390
const messages = parseCompileErrors ( request . responseText ) ;
391
- callback ( messages ) ;
391
+ callback ( messages . filter ( ( msg ) => msg . from && msg . to ) ) ;
392
392
} else if ( request . status === 0 ) {
393
393
// Request was cancelled because of a later change. Do nothing.
394
394
} else {
Original file line number Diff line number Diff line change @@ -2043,7 +2043,8 @@ function parseCompileErrors(rawErrors) {
2043
2043
. join ( '\n' ) ;
2044
2044
const re1 = / ^ p r o g r a m \. h s : ( \d + ) : ( ( \d + ) - ? ( \d + ) ? ) : ( \w + ) : ( .* ) / ;
2045
2045
const re2 = / ^ p r o g r a m \. h s : \( ( \d + ) , ( \d + ) \) - \( ( \d + ) , ( \d + ) \) : ( \w + ) : ( .* ) / ;
2046
- const reLink = / : L i n k i n g p r o g r a m [ . ] j s e x e .* / ;
2046
+ const reCompile = / : \[ [ 0 - 9 ] + o f [ 0 - 9 ] + \] C o m p i l i n g .* / ;
2047
+ const reLink = / : L i n k i n g p r o g r a m [ . ] j s e x e \b .* / ;
2047
2048
2048
2049
if ( err . trim ( ) === '' ) {
2049
2050
// Ignore empty messages.
@@ -2100,7 +2101,7 @@ function parseCompileErrors(rawErrors) {
2100
2101
fullText : err ,
2101
2102
message : ( match [ 6 ] ? `${ match [ 6 ] . trim ( ) } \n` : '' ) + otherLines ,
2102
2103
} ) ;
2103
- } else if ( ! reLink . test ( firstLine ) ) {
2104
+ } else if ( ! reCompile . test ( firstLine ) && ! reLink . test ( firstLine ) ) {
2104
2105
errors . push ( {
2105
2106
fullText : err ,
2106
2107
message : err ,
You can’t perform that action at this time.
0 commit comments