Skip to content

Commit

Permalink
Deprecate r - toggle off with error message to raise issue (#745)
Browse files Browse the repository at this point in the history
* Update tagui_header.js

* Update tagui_parse.php
  • Loading branch information
kensoh authored Mar 6, 2020
1 parent 174c6ec commit aa12682
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/tagui_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,7 @@ if (params == '') return "this.echo('ERROR - statement missing for " + raw_inten
else return check_chrome_context(params);}

function r_intent(raw_intent) { // code to support dynamic variables not applicable
return "this.echo('ERROR - R integration is deprecated, raise an issue if you need to use it')";
if (raw_intent.toLowerCase() == 'r begin') {inside_r_block = 1; return '';}
else if (raw_intent.toLowerCase() == 'r finish') {inside_r_block = 0; return '';}
if (inside_r_block == 1) raw_intent = 'r ' + raw_intent;
Expand Down
4 changes: 3 additions & 1 deletion src/tagui_parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,9 @@ function js_intent($raw_intent) {if (strtolower($raw_intent) == "js begin")
if ($params == "") echo "ERROR - " . current_line() . " statement missing for " . $raw_intent . "\n";
else return "casper.then(function() { // start of JS code\n".$params."\n}); // end of JS code"."\n\n";}

function r_intent($raw_intent) {if (strtolower($raw_intent) == "r begin")
function r_intent($raw_intent) {
echo "ERROR - R integration is deprecated, raise an issue if you need to use it\n"; return "";
if (strtolower($raw_intent) == "r begin")
{$GLOBALS['inside_r_block'] = 1; $GLOBALS['integration_block_body'] = "r "; return "";}
$raw_intent = str_replace('\\','\\\\',$raw_intent); // to send \ correctly over to integration
$raw_intent = str_replace('[END_OF_LINE]','\\n',$raw_intent); // replace after above to prevent from escape
Expand Down

0 comments on commit aa12682

Please sign in to comment.