import { Emoji, Heading } from './Regex' import Twemoji from 'twemoji' export const anchorHeader = { type: 'output', regex: Heading, replace: function (__match, id:string, title:string, level:number) { // github anchor style const octicon_html = `` return `${octicon_html}${title}` } } export const twemoji = { type: 'output', regex: Emoji, replace: function(__match, emoji: string) { console.log(emoji) const emoj = Twemoji.parse(emoji, { folder: 'svg', ext: '.svg' }) if(!emoj) return emoji return emoj } }