(input: string)
| 45 | } |
| 46 | |
| 47 | export function replaceLinkFormat(input: string): string { |
| 48 | return input.replace( |
| 49 | /\[([^\]]+)\]\((\d+ \d+ \d+ \d+)\)/g, |
| 50 | (_, text, numbers) => { |
| 51 | const formattedNumbers = numbers.replace(/ /g, "-"); |
| 52 | return `[${text}](#bb-${formattedNumbers})`; |
| 53 | }, |
| 54 | ); |
| 55 | } |
| 56 | |
| 57 | |
| 58 | type ParsedResult = { |