Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

457 B
Raw Blame
import config from '../../../../config/markdown_embeds.yml';

// Gists rely on document.write() and can't render inline in the editor.
const NON_PREVIEWABLE_EMBEDS = new Set(['github_gist']);

export const embeds = Object.entries(config)
  .filter(([key]) => !NON_PREVIEWABLE_EMBEDS.has(key))
  .map(([key, { regex, template, hide_source: hideSource }]) => ({
    key,
    regex: new RegExp(regex),
    template,
    hideSource: Boolean(hideSource),
  }));