Module for extracting code
(code: str)
| 6 | |
| 7 | |
| 8 | def extract_code(code: str) -> str: |
| 9 | """ |
| 10 | Module for extracting code |
| 11 | """ |
| 12 | pattern = r"```(?:python)?\n(.*?)```" |
| 13 | |
| 14 | match = re.search(pattern, code, re.DOTALL) |
| 15 | |
| 16 | return match.group(1) if match else code |
no outgoing calls
no test coverage detected