Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
fixed brackets between apostrophes folding
Browse files Browse the repository at this point in the history
  • Loading branch information
maxijabase committed Sep 27, 2021
1 parent 1cd21d2 commit 2c0012b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion UI/Components/EditorElement/Foldings/EditorFoldingStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public IEnumerable<NewFolding> CreateNewFoldings(ITextSource document)
var newFoldings = new List<NewFolding>();
var startOffsets = new Stack<int>();
var lastNewLineOffset = 0;
var CommentMode = 0; // 0 = None, 1 = Single, 2 = Multi, 3 = String
var CommentMode = 0; // 0 = None, 1 = Single, 2 = Multi, 3 = String, 4 = Char
for (var i = 0; i < document.TextLength; ++i)
{
var c = document.GetCharAt(i);
Expand Down Expand Up @@ -91,6 +91,11 @@ public IEnumerable<NewFolding> CreateNewFoldings(ITextSource document)
CommentMode = 3;
break;
}
case '\'':
{
CommentMode = 4;
break;
}
}
break;
}
Expand Down Expand Up @@ -121,6 +126,14 @@ public IEnumerable<NewFolding> CreateNewFoldings(ITextSource document)
}
break;
}
case 4:
{
if (c == '\'')
{
CommentMode = 0;
}
break;
}
}
}
}
Expand Down

0 comments on commit 2c0012b

Please sign in to comment.