Fix rendering of escape characters in string literals.

Fixes #125
This commit is contained in:
Kirill Osenkov 2019-10-02 13:55:41 -07:00
Родитель d8b1d1b040
Коммит 8b38c94fe8
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -5,6 +5,7 @@ using System.Runtime.InteropServices;
public static class Extensions
{
public static string NewLine => "\r\n";
public static void ExtensionMethod(this string s)
{
var s1 = new string(new char[0]);

Просмотреть файл

@ -30,7 +30,10 @@ namespace Microsoft.SourceBrowser.HtmlGenerator
// classified spans will be emitted for the same TextSpan. This will filter our those classified spans
// since they are "extra" information and do not represent the identifier type. This filter can be
// removed after taking Roslyn 3.1.0 as the classifier will filter before returning classified spans.
var ranges = classifiedSpans.Where(classifiedSpan => classifiedSpan.ClassificationType != ClassificationTypeNames.StaticSymbol)
var ranges = classifiedSpans.Where(classifiedSpan =>
classifiedSpan.ClassificationType != ClassificationTypeNames.StaticSymbol &&
classifiedSpan.ClassificationType != ClassificationTypeNames.StringEscapeCharacter &&
!classifiedSpan.ClassificationType.StartsWith("regex"))
.Select(classifiedSpan =>
new Range
{