(input: string)
| 18 | }; |
| 19 | |
| 20 | export const removeTaskPrefix = (input: string): string => { |
| 21 | // Regular expression to match task prefixes. Consult tests to understand regex |
| 22 | const prefixPattern = |
| 23 | /^(Task\s*\d*\.\s*|Task\s*\d*[-:]?\s*|-?\d+\s*[-:]?\s*)/i; |
| 24 | |
| 25 | // Replace the matched prefix with an empty string |
| 26 | return input.replace(prefixPattern, ""); |
| 27 | }; |
| 28 | |
| 29 | export const extractTasks = ( |
| 30 | text: string, |
no outgoing calls
no test coverage detected