From d15d998f5c4caf15449d557f393f2a8544ac0a62 Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 2 Feb 2021 13:05:45 +0200 Subject: [PATCH] fix if link has comment parts --- src/utils/postUrlParser.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/postUrlParser.js b/src/utils/postUrlParser.js index 8d3b1474f..beec6b6d5 100644 --- a/src/utils/postUrlParser.js +++ b/src/utils/postUrlParser.js @@ -101,6 +101,14 @@ export default (url) => { // For non urls with category like esteem/@good-karma/esteem-london-presentation-e3105ba6637ed match = url.match(/([\w.\d-]+)\/(@[\w.\d-]+)\/(.*)/); if (match && match.length === 4) { + if (match[3].indexOf('#') > -1) { + const commentPart = match[3].split('@')[1]; + return { + category: match[1], + author: commentPart.split('/')[0], + permlink: commentPart.split('/')[1], + }; + } return { category: match[1], author: match[2].replace('@', ''),