From d8958ed68d1b315d9a49ca45f4db3a7472d36cbb Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 10 Feb 2012 13:38:24 +0000 Subject: [PATCH] gfse: bug fix: syntax check in concrete syntax wasn't working In newer versions of GF the shell says "syntax error" instead of "parse error". --- src/www/gfse/cloud.js | 2 +- src/www/gfse/cloud2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/www/gfse/cloud.js b/src/www/gfse/cloud.js index 18cbaae9f..f35ba7012 100644 --- a/src/www/gfse/cloud.js +++ b/src/www/gfse/cloud.js @@ -140,7 +140,7 @@ function gfshell(cmd,cont) { function check_exp(s,cont) { function check(gf_message) { //debug("cc "+s+" = "+gf_message); - cont(/parse error/.test(gf_message) ? "parse error" : null); + cont(/(parse|syntax) error/.test(gf_message) ? "syntax error" : null); } if(navigator.onLine) ajax_http_get("upload.cgi?cc="+encodeURIComponent(s),check) diff --git a/src/www/gfse/cloud2.js b/src/www/gfse/cloud2.js index 4794e4ea0..7b3d90f0f 100644 --- a/src/www/gfse/cloud2.js +++ b/src/www/gfse/cloud2.js @@ -171,7 +171,7 @@ function gfshell(cmd,cont) { function check_exp(s,cont) { function check(gf_message) { //debug("cc "+s+" = "+gf_message); - cont(/parse error/.test(gf_message) ? "parse error" : null); + cont(/(parse|syntax) error/.test(gf_message) ? "syntax error" : null); } gfshell("cc "+s,check); }