-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-level flow inside for loops and conditions, bug for this usage scenario - fixed #961
Comments
Hi @queyintik thanks for raising this! I confirm that you have found a bug that we didn't run into when testing the tagui step. Let me look into this and make a patch to fix this. CC @ruthtxh function expand_intent($script_line) { // function to handle calling of other TagUI automation scripts for reusability
if ((strpos(strtolower(trim($script_line)),'tagui ') === 0) or (strtolower(trim($script_line)) == 'tagui')) {
$params = trim(substr(trim($script_line)." ",1+strpos(trim($script_line)." "," "))); if ($params == "")
die("ERROR - filename missing for step " . trim($script_line) . "\n");
else if (!file_exists(abs_file($params)))
die("ERROR - file not found for step " . trim($script_line) . "\n");
else {$indentation_for_tagui_step = str_replace(ltrim($script_line),'',$script_line);
$expanded_intent = ""; $temp_input_file = fopen(abs_file($params),'r'); if ($temp_input_file == false)
die("ERROR - cannot open file for step " . trim($script_line) . "\n"); something needs to be changed in below line for tagui_parse.php, otherwise when a subflow is expanded, only its first line will follow the indentation depth of the parent but not 2nd line onwards while(!feof($temp_input_file)) {$expanded_intent .= $indentation_for_tagui_step . expand_intent(fgets($temp_input_file));} fclose($temp_input_file); return $expanded_intent;}} else return rtrim($script_line) . "\n";} |
Hi @queyintik, above commit seems to solve the problem and generates correct results below. Can you help to test on different usage scenarios that you may have to see if this fix solves all such problems without causing new problems? You and other users with this issue can download the latest copy of TagUI from here and unzip to overwrite your existing installation (please drag the folders under tagui\src to overwrite your existing installation) - https://github.com/kelaberetiv/TagUI/archive/master.zip In the next release, this fix will become part of the packaged zip files. Thank you very much for spotting and reporting this bug!!
|
I've updated |
Closing issue, change included in latest packaged release - https://github.com/kelaberetiv/TagUI/releases/tag/v6.46.0 |
Thank you for creating TagUI. It helps me a lot in my daily work.
I just upgraded from TagUI 5 to TagUI 6 and came across the following issue in version 6.14:
I have 3 files: main.tag, flow1.tag and flow2.tag with content as follows:
main.tag:
flow1.tag:
flow2.tag:
However, when I run
tagui main.tag -h
, the output is as follows (which is not as expected):Looking at the .raw file generated, a curly bracket is closed early (right after the first line of flow2.tag)
main.raw:
Not sure if there is any workaround with this issue. Thank you for your time.
The text was updated successfully, but these errors were encountered: