Export markdown

Is there any way to download/export generated markdown (not HTML)?

i.e. I’ve got variables in a markdown cell. I want to download the markdown in its current state.

you might replace

md`aa ${x}`

with

`aa ${x}`

and then “download text”

Thanks! Just what I needed!