mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-02 18:25:12 +00:00
fix custom link attribute
This commit is contained in:
parent
05e4f87707
commit
9372c19b00
1 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,10 @@ const locateMention = (value, fromIndex) => value.indexOf('@', fromIndex);
|
||||||
const createURI = (text, uri, autoEmbed = false) => ({
|
const createURI = (text, uri, autoEmbed = false) => ({
|
||||||
type: 'link',
|
type: 'link',
|
||||||
url: (uri.startsWith(protocol) ? '' : protocol) + uri,
|
url: (uri.startsWith(protocol) ? '' : protocol) + uri,
|
||||||
data: { hProperties: { dataPreview: autoEmbed } },
|
data: {
|
||||||
|
// Custom attribute
|
||||||
|
hProperties: { 'data-preview': autoEmbed },
|
||||||
|
},
|
||||||
children: [{ type: 'text', value: text }],
|
children: [{ type: 'text', value: text }],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue