refactor: Move all processing logic to CodeHandler::processText() (#107)

This will become useful once more processing modes are available
This commit is contained in:
Povilas Kanapickas
2025-03-06 19:49:28 +02:00
committed by GitHub
parent 5536de146c
commit 521261e0a3
4 changed files with 18 additions and 7 deletions

View File

@ -33,6 +33,15 @@ class CodeHandlerTest : public QObject, public testing::Test
Q_OBJECT
};
TEST_F(CodeHandlerTest, testProcessTextNoProcessWithCodeBlock)
{
QString input = "This is a comment\n"
"```python\nprint('Hello, world!')\n```\n"
"Another comment";
EXPECT_EQ(CodeHandler::processText(input, false), input);
}
TEST_F(CodeHandlerTest, testProcessTextWithCodeBlock)
{
QString input = "This is a comment\n"