Skip to content

Commit 989473b

Browse files
obonessavornicesei
authored andcommitted
Do not hardcode line endings
1 parent a6ead0a commit 989473b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

project/core/sourcecontrol/VstsHistoryParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public Modification[] Parse(TextReader vstsLog, DateTime from, DateTime to)
7575
private Modification[] ParseChangeSet(StringBuilder changeSet)
7676
{
7777

78-
Regex parser = new Regex(@"Changeset:[ \t](?<changenumber>[0-9]*)\r\nUser:[ \t](?<author>.*)\r\n(Checked in by.*\r\n)?Date:[ \t](?<date>.*)\r\n\r\nComment:(?<comment>(?:\r\n.*)*)\r\n\r\nItems:(?<items>(?:\r\n.*)*)\r\n\r\n");
78+
Regex parser = new Regex(@"Changeset:[ \t](?<changenumber>[0-9]*)" + Environment.NewLine + "User:[ \t](?<author>.*)" + Environment.NewLine + "(Checked in by.*" + Environment.NewLine + ")?Date:[ \t](?<date>.*)" + Environment.NewLine + Environment.NewLine + "Comment:(?<comment>(?:" + Environment.NewLine + ".*)*)" + Environment.NewLine + Environment.NewLine + "Items:(?<items>(?:" + Environment.NewLine + ".*)*)" + Environment.NewLine + Environment.NewLine);
7979
Regex itemParser = new Regex("\n (?<type>[^$]+) (?<item>\\$/.*)", RegexOptions.Multiline);
8080

8181
Match ChangeSet = parser.Match(changeSet.ToString(), 0);

0 commit comments

Comments
 (0)