From b76fd706b40d39c207157d43d671e12e1f642af7 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Mon, 28 Jul 2025 15:03:19 +0200 Subject: [PATCH] md_to_code.py updated to handle print functions in the last line --- tests/md_to_code.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/md_to_code.py b/tests/md_to_code.py index 2d9c7dc..7aa9dcb 100644 --- a/tests/md_to_code.py +++ b/tests/md_to_code.py @@ -96,6 +96,7 @@ def segments_to_test(segments: Iterable[markdown_segment], script_language: str ret_block_flag = lines[-1] if (not re.match(r'^[^(]*=', lines[-1]) and not lines[-1].startswith('import ') and not lines[-1].startswith('from ') and + not lines[-1].startswith('print(') and not lines[-1].startswith(' ')) else None # print('Last line: ', ret_block_flag, '-----------', lines[-1])