Remove check that prevents adding newlines before the last line#49
Remove check that prevents adding newlines before the last line#49dakotahawkins wants to merge 2 commits intoWumpf:masterfrom
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.
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.
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.
Bug fix versioned
|
|
||
|
|
||
|
|
||
| "; |
There was a problem hiding this comment.
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