diff options
| -rw-r--r-- | cli/main.cpp | 11 | ||||
| -rw-r--r-- | diceparser.cpp | 2 | ||||
| -rw-r--r-- | parsingtoolbox.cpp | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/cli/main.cpp b/cli/main.cpp index 0f984c1..e93c492 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -259,6 +259,7 @@ int startDiceParsing(QStringList& cmds,QString& treeFile,bool withColor, EXPORTF QString warnings = parser.humanReadableWarning(); QStringList strLst; QStringList listOfDiceResult; + QString cmdRework = parser.getDiceCommand(); if(parser.hasIntegerResultNotInFirst()) { @@ -357,21 +358,21 @@ int startDiceParsing(QStringList& cmds,QString& treeFile,bool withColor, EXPORTF switch(format) { case TERMINAL: - displayCommandResult(scalarText, resultStr, array, withColor, cmd, error,warnings, comment, allSameFaceCount, allSameColor); + displayCommandResult(scalarText, resultStr, array, withColor, cmdRework, error,warnings, comment, allSameFaceCount, allSameColor); break; case SVG: - displaySVG(scalarText, resultStr, array, withColor, cmd, error,warnings, comment, allSameFaceCount, allSameColor); + displaySVG(scalarText, resultStr, array, withColor, cmdRework, error,warnings, comment, allSameFaceCount, allSameColor); break; case BOT: case MARKDOWN: - displayMarkdown(scalarText, resultStr, array, withColor, cmd, error,warnings, comment, allSameFaceCount, allSameColor); + displayMarkdown(scalarText, resultStr, array, withColor, cmdRework, error,warnings, comment, allSameFaceCount, allSameColor); break; case JSON: - displayJSon(scalarText, resultStr, array, withColor, cmd, error,warnings, comment, allSameFaceCount, allSameColor); + displayJSon(scalarText, resultStr, array, withColor, cmdRework, error,warnings, comment, allSameFaceCount, allSameColor); break; #ifdef PAINTER_OP case IMAGE: - displayImage(scalarText, resultStr, array, withColor, cmd, comment, allSameFaceCount, allSameColor); + displayImage(scalarText, resultStr, array, withColor, cmdRework, comment, allSameFaceCount, allSameColor); break; #endif } diff --git a/diceparser.cpp b/diceparser.cpp index c65ef74..7210d8c 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -889,7 +889,7 @@ bool DiceParser::readInstructionList(QString& str) { latest = ParsingToolBox::getLatestNode(latest); } - keepParsing = (!str.isEmpty() & (before!=str)); + keepParsing = (!str.isEmpty() && (before!=str)); } } if( !str.isEmpty() && readInstructionOperator(str[0])) diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp index 0fc7b50..3c2afe5 100644 --- a/parsingtoolbox.cpp +++ b/parsingtoolbox.cpp @@ -802,6 +802,7 @@ bool ParsingToolBox::readComment(QString& str, QString & result, QString& commen comment = left; str = str.remove(0,1); result = str.trimmed(); + str = ""; return true; } return false; |