Skip to content

Commit eb6e3bd

Browse files
committed
Allowing for non-indented lines (labels) within indented, nested blocks
1 parent b483557 commit eb6e3bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ReadableExpressions/StringExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ public static bool IsTerminated(this string codeLine)
3030
{
3131
for (var i = 0; i < codeLines.Length; i++)
3232
{
33-
codeLines[i] = codeLines[i].Substring(IndentSpaces.Length);
33+
if (codeLines[i].Length != 0)
34+
{
35+
codeLines[i] = codeLines[i].Substring(IndentSpaces.Length);
36+
}
3437
}
3538
}
3639

0 commit comments

Comments
 (0)