* Check if two arrays of lines match after trimming both sides.
(lines: string[], pattern: string[], startIndex: number)
| 63 | * Check if two arrays of lines match after trimming both sides. |
| 64 | */ |
| 65 | function trimMatch(lines: string[], pattern: string[], startIndex: number): boolean { |
| 66 | for (let i = 0; i < pattern.length; i++) { |
| 67 | if (lines[startIndex + i]?.trim() !== pattern[i]?.trim()) { |
| 68 | return false |
| 69 | } |
| 70 | } |
| 71 | return true |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Check if two arrays of lines match after Unicode normalization. |