@@ -57,24 +57,24 @@ def parse_patch_blocks(text: str, multiple: bool = True) -> Union[str, List[str]
5757
5858def parse_commit_blocks (text : str , multiple : bool = True ) -> Union [str , List [str ], None ]:
5959 """
60- Extract content between *** Begin Patch and *** End Patch markers (inclusive ),
60+ Extract content between *** Begin Commit and *** End Commit markers (exclusive ),
6161 ensuring that both markers are at zero indentation (start of line, no leading spaces).
6262
6363 Args:
64- text: Full input text containing one or more patch blocks.
65- multiple: If True, return a list of all patch blocks. If False, return the first match.
64+ text: Full input text containing one or more commit blocks.
65+ multiple: If True, return a list of all commit blocks. If False, return the first match.
6666
6767 Returns:
68- A string (single patch ), list of strings (multiple patches ), or None if not found.
68+ A string (single commit ), list of strings (multiple commits ), or None if not found.
6969 """
7070
71- pattern = r"(?m)^( \*\*\* Begin Commit[\s\S]*?^\*\*\* End Commit) $"
71+ pattern = r"(?m)^\*\*\* Begin Commit\n( [\s\S]*?) ^\*\*\* End Commit$"
7272 matches = re .findall (pattern , text )
7373
7474 if not matches :
7575 return None
7676
77- return matches if multiple else matches [0 ]
77+ return matches if multiple else matches [0 ]. strip ()
7878
7979def parse_steps_markdown (md : str ):
8080 steps = []
0 commit comments