Skip to content

Instantly share code, notes, and snippets.

@Akiyamka
Created May 11, 2020 15:50
Show Gist options
  • Save Akiyamka/3edc33fabe6295801bb68439912d50ca to your computer and use it in GitHub Desktop.
Save Akiyamka/3edc33fabe6295801bb68439912d50ca to your computer and use it in GitHub Desktop.
md remarkable template
import { Remarkable } from 'remarkable';
const mdRenderer = new Remarkable();
export function md(strings, ...keys) {
return mdRenderer.render(strings.reduce((result, str, i) => result += str + (
keys[i] === undefined
? ''
: keys[i])
, ''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment