Extend markdown support for LBRY urls #2521

Merged
btzr-io merged 27 commits from smart-links into master 2019-06-26 07:23:39 +02:00
Showing only changes of commit 9372c19b00 - Show all commits

View file

@ -8,7 +8,10 @@ const locateMention = (value, fromIndex) => value.indexOf('@', fromIndex);
const createURI = (text, uri, autoEmbed = false) => ({
type: 'link',
url: (uri.startsWith(protocol) ? '' : protocol) + uri,
data: { hProperties: { dataPreview: autoEmbed } },
data: {
// Custom attribute
hProperties: { 'data-preview': autoEmbed },
},
children: [{ type: 'text', value: text }],
});