Closed icornelius closed 2 years ago
@icornelius Just to clarify, this issue is only relevant when working with the zettel
command. Right?
My inclination is to fix it by only outputting a newline if and only if:
It is clear that the pandoc
Markdown had good reasons for this, although I am scratching my head as to why they could not have assumed a newline before processing the document section, since it does NOT affect processing headings or body text in practice. (That is, blank lines are for inter-paragraph spacing.)
Nevertheless, I am happy to support it. I wonder whether we should have a command line option frontmatter-spacing
which defaults to \n
(newline) and can be overridden if someone does not want a newline between the metadata and the document.
Upon hearing your thoughts, I'll proceed with the appropriate (trivial) fix.
I stand corrected. Pandoc evidently does assume a newline after a YAML metadata block. I should have tested that before. This issue can be closed.
Ok, @icornelius. I'm going to hold off on closing it until we're 100% sure. I still think there could be value to having an option to add some text between the YAML and Markdown body (even if only for cosmetic reasons).
@icornelius I'm going to go ahead and close this one for now. But feel free to reopen if it needs further investigation.
A single blank newline should follow the
---
that closes the yaml metadata block. The newline is necessary for recognition of ATX-style headers in pandoc's markdown (as stated here). It's easy enough to key the newline manually if keyingdocument
, but an extra step when using the--load-document
option.