You can get a lot of the export features (pdf, html, ePub, LaTeX, docX) with markdown if you just use pandoc [1]. Pandoc’s description from their website is, “If you need to convert files from one markup format into another, pandoc is your swiss-army knife... Pandoc is free software, released under the GPL.” It truly is an amazing program to me. I use it all the time for my school assignments. It’s a command line tool and for the most part you can write ‘pandoc -s <input-file-name> -o <output-file-name>‘ and it will guess how to convert it based on extension. I do my markdown editing with visual studio code, because it has a previewer that also supports LaTeX math mode in the markdown (vs code does the LaTeX math mode through KaTeX.) Pandoc also supports latex math mode in markdown so I can export math related assignments to pdf and such quickly.
Yep. They probably use Core Data (which is a layer on top of SQLite) internally instead of straight SQLite, but either way it ends up on disk as an SQLite file. A lot of standard Apple apps do this.
What bugs? I've been using pandoc for years (admittedly mostly for markdown --> pdf/html/docx, sometimes with bibtex and interesting latex tweaks) and never run into a bug.
[1]: http://pandoc.org