Skip to content

Commit 24359f3

Browse files
committed
fixed "indent module" bug when module contains type or enum
1 parent 92642a3 commit 24359f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rubberduck.SmartIndenter/Indenter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ private void CheckLine(IIndenterSettings settings, string code, ref bool noInden
699699
atFirstProcLine = true;
700700

701701
// don't indent within type or enum constructs
702-
if (value.EndsWith("Type") || value.EndsWith("Enum"))
702+
if (value.EndsWith("Type ") || value.EndsWith("Enum "))
703703
{
704704
ins++;
705705
noIndent = true;
@@ -714,7 +714,7 @@ private void CheckLine(IIndenterSettings settings, string code, ref bool noInden
714714
(line.Substring(value.Length, 1) == " " ||
715715
(line.Substring(value.Length, 1) == ":" &&
716716
line.Substring(value.Length + 1, 1) != "=")
717-
)).Count(value => !value.EndsWith("Type ") && !value.EndsWith("Enum"));
717+
)).Count(value => !value.EndsWith("Type ") && !value.EndsWith("Enum "));
718718

719719
outs += outMatches;
720720
if (outMatches > 0)

0 commit comments

Comments
 (0)