(content: str)
| 36 | |
| 37 | |
| 38 | def extract_cpp_code_blocks(content: str) -> List[Tuple[str, int]]: |
| 39 | # Extract C++ code blocks from markdown content. |
| 40 | code_blocks = [] |
| 41 | pattern = r"```cpp\n(.*?)```" |
| 42 | |
| 43 | for match in re.finditer(pattern, content, re.DOTALL): |
| 44 | code = match.group(1).strip() |
| 45 | line_num = content[: match.start()].count("\n") + 1 |
| 46 | code_blocks.append((code, line_num)) |
| 47 | |
| 48 | return code_blocks |
| 49 | |
| 50 | |
| 51 | def is_complete_example(code: str) -> bool: |
no test coverage detected