diff --git a/NEWS.md b/NEWS.md index 9b5875b3..4af4a3e9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,7 @@ Red Panda C++ Version 2.27 - enhancement: Migrate external calls from command string to argv array to improve safety and security. - enhancement: Support POSIX shell-like escaping in user inputs for compiler arguments. - fix: (Hopefully) properly escape filenames and arguments in makefile generation. + - enhancement: Beautify display for spaces and linebreaks. Red Panda C++ Version 2.26 - enhancement: Code suggestion for embedded std::vectors. diff --git a/libs/qsynedit/qsynedit/syntaxer/cpp.cpp b/libs/qsynedit/qsynedit/syntaxer/cpp.cpp index 76620cb8..06195fe7 100644 --- a/libs/qsynedit/qsynedit/syntaxer/cpp.cpp +++ b/libs/qsynedit/qsynedit/syntaxer/cpp.cpp @@ -1261,6 +1261,8 @@ void CppSyntaxer::procString() if (mLine[mRun]=='"') { mRun++; break; + } else if (mLine[mRun]==' ' || mLine[mRun]=='\t') { + return; } else if (mLine[mRun]=='\\') { if (mRun == mLineSize-1) { mRun++; @@ -1306,12 +1308,13 @@ void CppSyntaxer::procString() void CppSyntaxer::procStringStart() { mTokenId = TokenId::String; + mRange.state = RangeState::rsString; mRun += 1; if (mRun>=mLineSize) { mRange.state = RangeState::rsUnknown; return; } - procString(); + //procString(); } void CppSyntaxer::procTilde()