-
Notifications
You must be signed in to change notification settings - Fork 22
Remove check that prevents adding newlines before the last line #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove check that prevents adding newlines before the last line #49
Conversation
|
I assume updating the packages is OK, but your comment in #47 worries me w.r.t. VS2015 compatibility. I'll see if I can test it (my VS environments are a little messed up at the moment). 👎 Doesn't work! 👎 |
| firstLine = false; | ||
| } | ||
|
|
||
| while (hasElements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran into this issue again, and I think the above is a cleaner fix.
| sortedIncludes = sortedIncludes.OrderBy(x => x.LineDelimiterType == IncludeLineInfo.DelimiterType.Quotes ? 0 : 1); | ||
|
|
||
| // Finally, update the actual lines | ||
| // Merge sorted includes with original non-include lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing what we were doing before to insert original non-include lines, this merges those in ahead of time. That way, there's less weird broken logic trying to do it on the fly :)
| <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011"> | ||
| <Metadata> | ||
| <Identity Id="IncludeToolbox.Andreas Reich.075c2e2b-7b71-45ba-b2e6-c1dadc81cfac" Version="2.2.0.1" Language="en-US" Publisher="Andreas Reich" /> | ||
| <Identity Id="IncludeToolbox.Andreas Reich.075c2e2b-7b71-45ba-b2e6-c1dadc81cfac" Version="2.2.1" Language="en-US" Publisher="Andreas Reich" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug fix versioned
| "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll see a lot of empty lines in the "expected output", because every test except one removes duplicates, and there are a lot of duplicates.
|
2015 is broken, probably by NuGet updates. |
|
New PR: #50 |
de88fd1 added a check to prevent adding a newline before the last line in
a batch. Since we're prepending, however, a newline is desirable if the
last line is the only one in its group.
Fixes #48