fix escape character problem in multi-line commands

This commit is contained in:
SinaKarvandi 2021-10-09 23:36:59 +03:30
parent c94caa789d
commit b9bd771f35

View file

@ -75,6 +75,9 @@ CheckMultilineCommand(std::string CurrentCommand)
case '{':
if (IsPreviousCharacterABackSlash)
IsPreviousCharacterABackSlash = false;
if (!IsOnString)
CountOfOpenCurlyBrackets++;
@ -82,6 +85,9 @@ CheckMultilineCommand(std::string CurrentCommand)
case '}':
if (IsPreviousCharacterABackSlash)
IsPreviousCharacterABackSlash = false;
if (!IsOnString && CountOfOpenCurlyBrackets > 0)
CountOfOpenCurlyBrackets--;
@ -205,7 +211,7 @@ main(int argc, char * argv[])
//
// Show a small signature
//
printf("> ");
printf("> ");
//
// Get next command