Skip to content

Commit b5d4731

Browse files
committed
code fixes
1 parent 9442f96 commit b5d4731

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/CodeSnip/MainWindow.xaml.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,7 @@ private void SetupFolding(Snippet snippet)
622622

623623
if (foldingStrategy != null)
624624
{
625-
if (foldingManager == null)
626-
foldingManager = FoldingManager.Install(textEditor.TextArea);
625+
foldingManager ??= FoldingManager.Install(textEditor.TextArea);
627626

628627
try
629628
{
@@ -652,7 +651,7 @@ private void SetupFolding(Snippet snippet)
652651
}
653652
}
654653

655-
private string MapLangCodeToMarkdown(string code)
654+
private static string MapLangCodeToMarkdown(string code)
656655
{
657656
return code.ToLower() switch
658657
{

0 commit comments

Comments
 (0)