Open katz12 opened 5 years ago
@katz12 What impact is this having on your Markdown documents, and how they are used / rendered, if any? Currently, this seems like a low priority issue.
The impact is fairly use case specific, but I have a need to ensure that a markdown document does not change in any unexpected ways.
Feel free to treat this as low priority as I have changed my approach and am no longer using gray-matter.
Feel free to treat this as low priority as I have changed my approach and am no longer using gray-matter.
@katz12 Out of curiosity, what is your approach now?
I think I ended up hand rolling my own parser/writer that doesn't add newlines. But I also switched to using a JSON format for the front matter, so gray-matter would not have worked for me.
The logic for newline in stringify.js will add a newline to the end of the markdown document if it did not already exist.
This is obviously a matter of opinion, but I think it would be best if stringify did not alter the original markdown in any way except to add front matter.