From 671bf7bdf20ccc61339d0959b1fb2f81a316825b Mon Sep 17 00:00:00 2001 From: Renaud G Date: Wed, 21 Oct 2020 11:34:58 +0200 Subject: fix output --- diceparser.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'diceparser.cpp') diff --git a/diceparser.cpp b/diceparser.cpp index d42716a..5b91994 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -204,12 +204,13 @@ QString DiceParser::humanReadableWarning() const return str; } -QString DiceParser::finalStringResult() const +QString DiceParser::finalStringResult(std::function colorize) const { - return m_parsingToolbox->finalStringResult(); + return m_parsingToolbox->finalStringResult(colorize); } -QString DiceParser::resultAsJSon(std::function colorize) const +QString DiceParser::resultAsJSon(std::function colorize, + bool removeUnhighligthed) const { QJsonObject obj; QJsonArray instructions; @@ -227,7 +228,7 @@ QString DiceParser::resultAsJSon(std::functiongetComment(); obj["error"]= humanReadableError(); obj["scalar"]= m_parsingToolbox->finalScalarResult().first; - obj["string"]= m_parsingToolbox->finalStringResult(); + obj["string"]= m_parsingToolbox->finalStringResult(colorize, removeUnhighligthed); obj["warning"]= humanReadableWarning(); obj["command"]= m_command; -- cgit v1.2.3-70-g09d2