I have the filter newlines set to “No.” I am using the Parsedown plugin for markdown. A script to grab the files and email them is a good idea. That way I would not have to study all the functions and hooks inside WordPress. I will have to take a look.