(raw: string, suffix: string)
| 40 | } |
| 41 | |
| 42 | function closesFence(raw: string, suffix: string) { |
| 43 | const mark = raw.match(/^[ \t]{0,3}(`{3,}|~{3,})/)?.[1] |
| 44 | if (!mark) return suffix.includes("```") || suffix.includes("~~~") |
| 45 | return `${raw.slice(-(mark.length - 1))}${suffix}`.includes(mark) |
| 46 | } |
| 47 | |
| 48 | function heal(text: string) { |
| 49 | return remend(text, { linkMode: "text-only" }) |