comment-to-markdown formatting has to be done after writing source files, because doing the formatting in parallel breaks links between doc-objects and source files.