You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kensoh
changed the title
Review use of backticks for variables in conditions - to review
Review use of backticks for variables in if condition and for loop - to review
May 24, 2021
kensoh
changed the title
Review use of backticks for variables in if condition and for loop - to review
Review using backticks for variables in if condition and for loop - to review
May 24, 2021
kensoh
changed the title
Review using backticks for variables in if condition and for loop - to review
Review using backticks to enclose variables in if condition and for loop - to review
May 24, 2021
Following changes will let parsing engine ignore the backticks in conditions and code, after replacing with repo and datatable.
// if line is code, replacing with repo and datatable should already be done// thus below line support `variable` in conditions by ignoring `` detectedif (is_code($script_line)) returnstr_replace("`","",$script_line);
// if line is code, replacing with repo and datatable should already be done// thus below line support `variable` in conditions by ignoring `` detectedif(is_code(script_line))returnscript_line.replace(/`/g,'',script_line);
However, how to convert human language text into text with quotations?
Converting this
if `address` equals to block 123 apple lane
to this isn't straightforward
if (address == 'block 123 apple lane')
Converting this
if `address` equals to block 123 apple lane and `address` contains apple lane
to this most likely will lead to JS compilation error for some other user conditions
if ((address == 'block 123 apple lane') && (address.indexOf('apple lane') > -1))
For now, conclusion is it's hard to accurately do using backticks for variables and no quotation marks for text.
Thus, go in direction of giving examples and showing users, instead of changing to be consistent at expense of accuracy.
kensoh
changed the title
Review using backticks to enclose variables in if condition and for loop - to review
Review using backticks to enclose variables in if condition and for loop - can't, risk of error
May 27, 2021
kensoh
changed the title
Review using backticks to enclose variables in if condition and for loop - can't, risk of error
Review backticks to enclose variables in if condition and for loop - can't, high risk of error
May 27, 2021
#953 might open up possibility for this to be done with good risk / reward
The text was updated successfully, but these errors were encountered: