Skip to content

Commit 4748bab

Browse files
committed
Correction searching templates of keywords
1 parent fc18dc6 commit 4748bab

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/VBACHIndent.pas

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,17 @@ implementation
2525
BlockingIndent: Char = #1;
2626

2727
var
28-
arrBlockStart: array [0..27] of string = ('^If\s{1,}.*\s{1,}Then((\s*)$|(\s*)''(.*)$|$)', '^#If\s{1,}.*\s{1,}Then.*',
29-
'^For\s{1,}.*', '^Do\s{1,}.*', '^Do', '^Select\s{1,}Case\s{1,}.*', '^While\s{1,}.*', '^With\s{1,}.*',
28+
arrBlockStart: array [0..26] of string = ('^If\s{1,}.*\s{1,}Then((\s*)$|(\s*)''(.*)$|$)', '^#If\s{1,}.*\s{1,}Then.*',
29+
'^For\s{1,}.*', '^Do((\s{1,}.*)|$)', '^Select\s{1,}Case\s{1,}.*', '^While\s{1,}.*', '^With\s{1,}.*',
3030
'^Private\s{1,}Function\s{1,}.*', '^Public\s{1,}Function\s{1,}.*', '^Friend\s{1,}Function\s{1,}.*',
3131
'^Function\s{1,}.*', '^Private\s{1,}Sub\s{1,}.*', '^Public\s{1,}Sub\s{1,}.*', '^Friend\s{1,}Sub\s{1,}.*',
3232
'^Sub\s{1,}.*', '^Private\s{1,}Property\s{1,}.*', '^Public\s{1,}Property\s{1,}.*', '^Friend\s{1,}Property\s{1,}.*',
3333
'^Property\s{1,}.*', '^Private\s{1,}Enum\s{1,}.*', '^Public\s{1,}Enum\s{1,}.*', '^Friend\s{1,}Enum\s{1,}.*',
3434
'^Enum\s{1,}.*', '^Private\s{1,}Type\s{1,}.*', '^Public\s{1,}Type\s{1,}.*', '^Friend\s{1,}Type\s{1,}.*', '^Type\s{1,}.*');
3535

36-
arrBlockEnd: array [0..27] of string = ('^End\s{1,}If', '^#End\s{1,}If', '^Next(\s{1,}.*)*', '^Loop',
37-
'^Loop\s{1,}.*', '^End\s{1,}Select', '^Wend', '^End\s{1,}With', '^End\s{1,}Function', '^End\s{1,}Function',
38-
'^End\s{1,}Function', '^End\s{1,}Function', '^End\s{1,}Sub', '^End\s{1,}Sub', '^End\s{1,}Sub',
39-
'^End\s{1,}Sub', '^End\s{1,}Property', '^End\s{1,}Property', '^End\s{1,}Property', '^End\s{1,}Property',
40-
'^End\s{1,}Enum', '^End\s{1,}Enum', '^End\s{1,}Enum', '^End\s{1,}Enum', '^End\s{1,}Type', '^End\s{1,}Type',
41-
'^End\s{1,}Type', '^End\s{1,}Type');
36+
arrBlockEnd: array [0..11] of string = ('^End\s{1,}If', '^#End\s{1,}If', '^Next(\s{1,}.*)*', '^Loop((\s{1,}.*)|$)',
37+
'^End\s{1,}Select', '^Wend(\s{1,}|$)', '^End\s{1,}With', '^End\s{1,}Function', '^End\s{1,}Sub',
38+
'^End\s{1,}Property', '^End\s{1,}Enum', '^End\s{1,}Type');
4239

4340
arrBlockMiddle: array [0..4] of string = ('^ElseIf\s{1,}.*\s{1,}Then', '^#ElseIf\s{1,}.*\s{1,}Then', '^Else', '^#Else', '^Case\s{1,}.*');
4441

0 commit comments

Comments
 (0)