File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,8 @@ export const isFile = async (path: string): Promise<boolean> => {
163163
164164export const multiLinePatternMatch = (
165165 content : string ,
166- pattern : string
166+ pattern : string ,
167+ offset = 0
167168) : { start ?: number ; end ?: number ; matched : boolean } => {
168169 const matched = content . includes ( pattern ) ;
169170
@@ -174,7 +175,7 @@ export const multiLinePatternMatch = (
174175 const contentLines = content . split ( / \r ? \n / ) ;
175176 const patternLines = pattern . split ( / \r ? \n / ) ;
176177
177- for ( let i = 0 ; i < contentLines . length ; i += 1 ) {
178+ for ( let i = offset ; i < contentLines . length ; i += 1 ) {
178179 if ( contentLines [ i ] === patternLines [ 0 ] ) {
179180 const contentGroup = contentLines
180181 . slice ( i , i + patternLines . length )
You can’t perform that action at this time.
0 commit comments