From a8d1e6b09a78c9a92e763fdbb789576ceedae395 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 8 Aug 2023 03:14:45 +0200 Subject: [PATCH] main.cpp: Add a newline to code that is given by the "--text" argument Signed-off-by: Username404 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 66749d0..75f388a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) { unit_result resultingPair; try { resultingPair.first = Target::forName(target, newLines)->transpileWithTree( - parseString(text_provided ? currentArgument : getFileContent(file_path->string())) + parseString(text_provided ? string(currentArgument) + '\n' : getFileContent(file_path->string())) ); if (!text_provided or output_directory.has_value()) outputFileContent(