docpad-plugin-partials
docpad-plugin-partials copied to clipboard
sort of fixes #23
This strips \r's so that the tests pass on windows. I think there's still another bug lurking in there though.
This should be linked to #23
I think it would better if we have a .gitattributes file that ensures LF as the default
Like this: https://github.com/google/traceur-compiler/blob/master/.gitattributes
Wouldn't that only affect checkin/checkout? The issue here is that docpad is generating files with OS-appropriate line-endings, but then the test is comparing it to a predefined file with unix-style line-endings.
(Or does DocPad read and honor .gitattributes for generated files?)
I've always found on windows that docpad tester generates the actual's
with \n and the expected files
contain \r\n (only when git EOL is not LF by default on windows)
Oh, I mentally swapped the actual/expected. You're totally right. The only suggestion I might make is to have it scoped to the test/out-expected dir rather than applying to everything.
Although, come to think of it, why is docpad outputting \n's? Shouldn't it just use whatever line ending is in the template?
I have become too preoccupied by other things to review, merge, and release this PR.
However, you should have received an invite a while ago to join the DocPad Extras Team, which will give you write access to this repository, so you can merge in the PR.
For an orientation, or if you need any assistance following the semi-automatic release process from CONTRIBUTING.md
, reach out via https://bevry.me/discord/dev