(
line: string,
fence: { marker: '`' | '~'; size: number } | null,
)
| 94 | } |
| 95 | |
| 96 | function isFenceClose( |
| 97 | line: string, |
| 98 | fence: { marker: '`' | '~'; size: number } | null, |
| 99 | ): boolean { |
| 100 | if (!fence) return false |
| 101 | const match = line.match(/^[ ]{0,3}(`{3,}|~{3,})[ \t]*$/) |
| 102 | if (!match) return false |
| 103 | const raw = match[1] |
| 104 | if (!raw) return false |
| 105 | return raw[0] === fence.marker && raw.length >= fence.size |
| 106 | } |
| 107 | |
| 108 | function getLineStartOffsets(lines: string[]): number[] { |
| 109 | const offsets: number[] = [] |
no outgoing calls
no test coverage detected