Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Jekyll fails to detect front matter on files with windows line endings #3304
Steps to reproduce (hint: line-ending-converter for Atom helps):
Front matter is detected, file is read in
File is treated as static HTML, front matter is converted raw.
Originally, I suspected this was my fault, introduced in #2211, but it appears it's
Jekyll should normalize in and customize out:
str1 = "hello\r" str2 = "hello\r\n" str1.encode(str1.encoding, :universal_newline => true) # => "hello\n" str2.encode(str2.encoding, :universal_newline => true) # => "hello\n"
Then on the way out do the same thing from an opt that Jekyll accepts, or if you detect Windows then default to
I'm with @envygeeks that we should normalize, if possible (for our own sanity, and for our users' sanity).
https://github.com/dweinberger/newclues/blob/master/newclues.html is an example file (with