import { toUrl, lastElement } from './utils' export default { url(match, options){ let config = options.linkOptions; return `${match}`; }, smiley(text, pre, code) { return `${pre}${code}`; }, emoji(text){ return ``; }, audio(match){ return `
` }, soundcloud(match, options){ let config = options.soundCloudOptions; return `
` }, spotify(match){ let id = lastElement(match.split('/')); return `
` }, codepen(id, options){ return `
` }, ideone(match, options){ return `
` }, jsbin(id, options){ return `
` }, jsfiddle(id, options){ id = lastElement(id) == '/' ? id.slice(0, - 1) : id; id = (id.indexOf('//') !== -1) ? id : `//${id}`; return `
` }, plunker(id, options){ return `
` }, image(match){ return `
` }, flickr(match, options){ return `
` }, instagram(match, options){ return `
`; }, slideShare(html){ return `
${html}
`; }, video(match){ return `
` }, dailymotion(match, options){ const id = lastElement(match.split('/')); return `
` }, liveleak(match, options){ return `
` }, ted(match, options){ let a = match.split('/'); const id = a[a.length - 1]; return `
` }, ustream(match, options){ let id = match.split('/'); id.splice(1, 0, 'embed'); return `
` }, detailsVimeo(data, fullData, embedUrl){ return `
${data.description}
${data.views}${data.likes}
` }, detailsYoutube(data, fullData, embedUrl){ return `
${data.description}
${data.views}${data.likes}
` }, vine(match, options){ const id = lastElement(match.split('/')); const config = options.vineOptions; return `
` }, vimeo(url, options){ return options.plyr ? `
` : `
` }, youtube(url, options){ return options.plyr ? `
` : `
` }, openGraph(data, options){ return `
${data.description}
` }, github(data, options){ return `
${data.description}
${data.stargazers_count}${data.network_count}
` }, gmap(latitude, longitude, location, options){ const config = options.mapOptions; if (config.mode === 'place') { return `
`; } else if (config.mode === 'streetview') { return `
`; } else if (config.mode === 'view') { return `
` } } }