2

Markdown to HTML on the clipboard

 1 year ago
source link: https://lincolnmullen.com/blog/markdown-to-html-on-the-clipboard/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Markdown to HTML on the clipboard

I often have small snippets of Markdown that I want to copy to the clipboard and then paste as HTML. I thought about writing an extension for Visual Studio Code, or a custom script for Boop. But that seemed like a lot of work for a simple task. And then I remembered: Unix.

pbpaste | pandoc | pbcopy

There is a one-liner which will work on a Mac to paste Markdown into Pandoc and then copy the resulting HTML back to the clipboard.

Can’t get much simpler than that.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK