The CommonMark
parser by Alexis produces structures representing the parsed markdown.
So a recursive descent emitting Scribble formatted output to a file seems to be relatively straight forward.
https://docs.racket-lang.org/commonmark/index.html#(part._structure)