[education/rkward] rkward: Fix format

Thomas Friedrichsmeier null at kde.org
Tue May 27 21:55:45 BST 2025


Git commit eb6f44d93f66bee039d4fe69285627703700c52f by Thomas Friedrichsmeier.
Committed on 27/05/2025 at 20:55.
Pushed by tfry into branch 'master'.

Fix format

M  +4    -4    rkward/autotests/rkparsedscript_test.cpp
M  +1    -1    rkward/misc/rkparsedscript.cpp

https://invent.kde.org/education/rkward/-/commit/eb6f44d93f66bee039d4fe69285627703700c52f

diff --git a/rkward/autotests/rkparsedscript_test.cpp b/rkward/autotests/rkparsedscript_test.cpp
index f92108bfe..133566d50 100644
--- a/rkward/autotests/rkparsedscript_test.cpp
+++ b/rkward/autotests/rkparsedscript_test.cpp
@@ -85,7 +85,7 @@ class RKParsedScriptTest : public QObject {
 			ctx = ctx0;
 			while (ctx.valid())
 				ctx = ps.nextStatement(ctx);
-/*			ctx = ps.firstContextInStatement(ctx0); // NOTE: This one may stay at the same position
+			ctx = ps.firstContextInStatement(ctx0); // NOTE: This one may stay at the same position
 			ctx = ps.firstContextInChunk(ctx0);
 			ctx = ctx0;
 			while (ctx.valid())
@@ -129,7 +129,7 @@ class RKParsedScriptTest : public QObject {
 
 			ctx = ctx0;
 			while (ctx.valid())
-				ctx = ps.parentRegion(ctx); */
+				ctx = ps.parentRegion(ctx);
 		}
 	}
   private Q_SLOTS:
@@ -323,9 +323,9 @@ class RKParsedScriptTest : public QObject {
 		QVERIFY(posb > posa);
 		// NOTE: Note sure wether or not we want to include the trailing comment,
 		// as part of the statement, so this test will only check the start
-		QVERIFY(script.mid(posa, posb-posa+1).startsWith(u"symb07"_s));
+		QVERIFY(script.mid(posa, posb - posa + 1).startsWith(u"symb07"_s));
 		// We do not want to include the delimiting newline, however
-		QVERIFY(!script.mid(posa, posb-posa+1).contains(u'\n'));
+		QVERIFY(!script.mid(posa, posb - posa + 1).contains(u'\n'));
 		QVERIFY(!ps.nextStatement(ctx).valid());
 
 		ctx = ps.contextAtPos(script.indexOf(u"symb14"));
diff --git a/rkward/misc/rkparsedscript.cpp b/rkward/misc/rkparsedscript.cpp
index aa31cba52..3ab9d5380 100644
--- a/rkward/misc/rkparsedscript.cpp
+++ b/rkward/misc/rkparsedscript.cpp
@@ -66,7 +66,7 @@ int RKParsedScript::addNextMarkdownChunk(int start, const QString &content) {
 	addContext(Top, chunkstart - 1, content.left(chunkend)); // in case markdown region has incomplete syntax
 	                                                         // limit parsing to the actual markdown region
 	if (context_list.back().type != Delimiter) context_list.emplace_back(Delimiter, chunkend, chunkend);
-	context_list.emplace_back(Top, chunkend, chunkend);      // HACK: Used as a dummy separator, here...
+	context_list.emplace_back(Top, chunkend, chunkend); // HACK: Used as a dummy separator, here...
 	return chunkend + chunk_barrier.length();
 }
 


More information about the rkward-tracker mailing list