Source Code: jimbrig/clip2mark
The conversion is carried out by to-markdown, a Markdown converter written in JavaScript and running locally in the browser.