Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit c3118cb

Browse files
fix #264
1 parent d22ee70 commit c3118cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser

src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/Parser.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ void AddCommentTags(SyntaxTree cu, IList<TagComment> tagComments, ITextSource fi
119119
int commentEndOffset = document.GetOffset(comment.EndLocation) - commentEndSignLength;
120120
int endOffset;
121121
int searchOffset = 0;
122+
// HACK: workaround for parser bug: uses \n instead of \r\n in comment.Content
123+
string commentContent = document.GetText(commentStartOffset, commentEndOffset - commentStartOffset + 1);
122124
do {
123125
int start = commentStartOffset + searchOffset;
124126
int absoluteOffset = document.IndexOf(match, start, document.TextLength - start, StringComparison.Ordinal);
@@ -131,7 +133,7 @@ void AddCommentTags(SyntaxTree cu, IList<TagComment> tagComments, ITextSource fi
131133
}
132134
tagComments.Add(new TagComment(content.Substring(0, match.Length), new DomRegion(cu.FileName, startLocation.Line, startLocation.Column), content.Substring(match.Length)));
133135
searchOffset = endOffset - commentStartOffset;
134-
} while (comment.Content.ContainsAny(TaskListTokens, searchOffset, out match));
136+
} while (commentContent.ContainsAny(TaskListTokens, searchOffset, out match));
135137
}
136138
}
137139
}

0 commit comments

Comments
 (0)