I use ReST more than MD, but they should work the in a similar way. For Leo trees that are intended to be used by Sphinx, I just make the headline of the top node start with
@rst. Otherwise I just put
@language rest in the body of the top node of the tree. The
rst3 command creates a ReST file, and this works correctly even if you have several
@rst nodes within the tree. You don't need external files at all. I thought there is or was going to be a similar command for md, but I don't find it in the codebase. There is a writer for writing
@auto-md trees that probably does what you want. It writes an external file when you save the outline. I'm not sure about handling the clones, though. If you use @auto-md, I think they would also work automatically.
BTW, in case you don't know about it yet, the viewrendered3 plugin will let you preview your rendered markdown within Leo, and even export the rendering to the system browser. This helps you to quickly spot mistakes in your markdown and try out syntax questions.