(rest: string, lower: string)
| 204 | } |
| 205 | |
| 206 | private matchOpen(rest: string, lower: string): { close: string; len: number } | 'partial' | null { |
| 207 | const fn = rest.match(FUNCTION_OPEN_RE); |
| 208 | if (fn) return { close: '</function>', len: fn[0].length }; |
| 209 | for (const b of SUPPRESS_BLOCKS) { |
| 210 | if (lower.startsWith(b.open)) return { close: b.close, len: b.open.length }; |
| 211 | } |
| 212 | if (FUNCTION_OPEN_PARTIAL_RE.test(rest) || isProperPrefixOfAny(lower, OPEN_PREFIXES)) return 'partial'; |
| 213 | return null; |
| 214 | } |
| 215 | |
| 216 | private matchStrayClose(lower: string): number | 'partial' | null { |
| 217 | for (const cl of STRAY_CLOSERS) { |
no test coverage detected