Commit e7b61c65 authored by Joseph McCullough's avatar Joseph McCullough

Don't exit if 'exit' or 'quit' are in quote blocks

parent 618f25bf
......@@ -182,9 +182,16 @@ main(void)
last_code_line[char_index] = '\0';
if ((strcmp(last_code_line, "quit") == 0) || (strcmp(last_code_line, "exit") == 0)) {
/*:quit the program */
if (!code_block_open || !parser->sterm){
break;
}
else{
/* count the quit/exit commands as strings if in a quote block */
strcat(ruby_code, "\n");
strcat(ruby_code, last_code_line);
}
}
else {
if (code_block_open) {
strcat(ruby_code, "\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment