fix iframe lbry links in markdown posts
This commit is contained in:
parent
33bf50e91b
commit
5a1eecfc4b
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,10 @@ function MarkdownLink(props: Props) {
|
|||
const linkPathname = decodeURIComponent(
|
||||
linkUrlObject.pathname.startsWith('//') ? linkUrlObject.pathname.slice(2) : linkUrlObject.pathname.slice(1)
|
||||
);
|
||||
const possibleLbryUrl = `lbry://${linkPathname.replace(/:/g, '#')}`;
|
||||
|
||||
const linkPathPlusHash = linkPathname + linkUrlObject.hash;
|
||||
const possibleLbryUrl = `lbry://${linkPathPlusHash.replace(/:/g, '#')}`;
|
||||
|
||||
const lbryLinkIsValid = isURIValid(possibleLbryUrl);
|
||||
if (lbryLinkIsValid) {
|
||||
lbryUrlFromLink = possibleLbryUrl;
|
||||
|
|
Loading…
Reference in a new issue