It would be really awesome if the front matter parser was a little smarter, a single newline at the top of the file breaks it #5765
factoidforrest
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
The front matter is commanded to be at the very top: https://jekyllrb.com/docs/front-matter/ (didn't find any formal spec about this, but all descriptions of front matter highlights this) It's the same case for JS hashbangs, and we used to have troubles with that as well. Maybe we could remove comments & trim before parsing front matter |
Beta Was this translation helpful? Give feedback.
0 replies
-
That sounds like a good compromise to me. Removing comments and white
space would still make sure that it's at the top of the file, without
worrying about things that shouldn't matter like a single carriage return.
…On Thu, Oct 21, 2021, 4:09 PM Joshua Chen ***@***.***> wrote:
The front matter is commanded to be at the very top:
https://jekyllrb.com/docs/front-matter/ (didn't find any formal spec
about this, but all descriptions of front matter highlights this)
It's the same case for JS hashbangs, and we used to have troubles with
that as well.
Maybe we could remove comments & trim before parsing front matter
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5765 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEOCEWIOC5AYGJVSATHR6DUICMRTANCNFSM5GO6XZGQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It made a real headache for us when our license tooling wanted to add license headers at the top of all our markdown files. We figured out a workaround where we put the license below the front matter, but even still, it seems really brittle that a single white space at the top of the file breaks the front-matter parser.
Beta Was this translation helpful? Give feedback.
All reactions