sachabruttin / CosmosDbExplorer

A nice client explorer for Azure Cosmos DB
https://www.bruttin.com/CosmosDbExplorer/
MIT License
107 stars 27 forks source link

SQL Comment Fix #89

Closed dprice closed 1 year ago

dprice commented 1 year ago

I noticed that the commenting was not correct for SQL queries. It would do the C# "\\" comments. This seems to work locally for me:

        private static string GetCommentPrefix(TextEditor? textEditor)
        {
            return textEditor?.SyntaxHighlighting.Name switch
            {
                "DocumentDb" => "--",
                "DocumentDbSql" => "--",  // <============================
                _ => "//",
            };
        }