Created
May 11, 2020 15:50
-
-
Save Akiyamka/3edc33fabe6295801bb68439912d50ca to your computer and use it in GitHub Desktop.
md remarkable template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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