-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the Hover LSP provider to use the new quickinfo service (#1870)
* Move the Hover LSP provider to use the new quickinfo service. * Fixed a bug in the new QuickInfo provider to escape markdown content in the actual text. * Fix tests, don't escape text for a few cases. Co-authored-by: Joey Robichaud <jorobich@microsoft.com>
- Loading branch information
Showing
5 changed files
with
67 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Text.RegularExpressions; | ||
|
||
namespace OmniSharp.Utilities | ||
{ | ||
public static class MarkdownHelpers | ||
{ | ||
private static Regex EscapeRegex = new Regex(@"([\\`\*_\{\}\[\]\(\)#+\-\.!])", RegexOptions.Compiled); | ||
|
||
public static string Escape(string markdown) | ||
{ | ||
if (markdown == null) | ||
return null; | ||
return EscapeRegex.Replace(markdown, @"\$1"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters