summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Lang/Cpp/CppParser.ts2
-rw-r--r--src/test/CppTests/Con-AndDestructor.test.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Lang/Cpp/CppParser.ts b/src/Lang/Cpp/CppParser.ts
index 35066fe..35f551c 100644
--- a/src/Lang/Cpp/CppParser.ts
+++ b/src/Lang/Cpp/CppParser.ts
@@ -430,7 +430,7 @@ export default class CppParser implements ICodeParser {
logicalLine.replace(/\*\//g, "");
}
- return logicalLine.trim();
+ return logicalLine.replace(/^\s+|\s+$/g, "");
}
throw new Error("More than " + linesToGet + " lines were read from editor and no end of expression was found.");
diff --git a/src/test/CppTests/Con-AndDestructor.test.ts b/src/test/CppTests/Con-AndDestructor.test.ts
index 36e4fd6..ba60501 100644
--- a/src/test/CppTests/Con-AndDestructor.test.ts
+++ b/src/test/CppTests/Con-AndDestructor.test.ts
@@ -54,7 +54,7 @@ suite("C++ - Con- and Destructor Tests", () => {
});
test("Deleted Destructor", () => {
- const result = testSetup.SetLine("virtual ~Foo() = 0").GetResult();
+ const result = testSetup.SetLine("virtual ~Foo() = 0;").GetResult();
assert.equal("/**\n * @brief \n * \n */", result);
});