From 52ddef9f79e32cd840ebb2cfade854ccfa1ee0b4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 22 Aug 2024 08:46:50 -0700 Subject: [PATCH] fix: Remove unnecessary checks and simplify content extraction in process_markdown function --- testsr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testsr.py b/testsr.py index 67a887bea..9e448b73d 100755 --- a/testsr.py +++ b/testsr.py @@ -21,15 +21,15 @@ def process_markdown(filename): results = [] for section in sections: + if "editblock_coder.py" in section or "test_editblock.py" in section: + continue + if not section.strip(): # Ignore empty sections continue # Extract the header (if present) header = section.split("\n")[0].strip() # Get the content (everything after the header) - content = "\n".join(section.split("\n")[1:]).strip() - - if "editblock" in content: - continue + content = "".join(section.splitlines(keepends=True)[1:]) for fence in all_fences: if "\n" + fence[0] in content: