Something that isn’t clear to me from this spec http://textbundle.org/spec/ is the exact format of Markdown that should be used here.
I was under the impression that the Gruber original at https://daringfireball.net/projects/markdown/ wasn’t well enough specified (unless you want to treat a 20 year old Perl script as a specification) to be interoperable - hence efforts like https://commonmark.org/