diff --git a/ui/component/claimLink/index.js b/ui/component/claimLink/index.js index 39bd1e9f9..6aaed830a 100644 --- a/ui/component/claimLink/index.js +++ b/ui/component/claimLink/index.js @@ -1,6 +1,7 @@ import { connect } from 'react-redux'; import { doResolveUri, makeSelectClaimForUri, makeSelectIsUriResolving } from 'lbry-redux'; import { doSetPlayingUri } from 'redux/actions/content'; +import { punctuationMarks } from 'util/remark-lbry'; import { selectBlackListedOutpoints } from 'lbryinc'; import { selectPlayingUri } from 'redux/selectors/content'; import ClaimLink from './view'; @@ -11,7 +12,7 @@ const select = (state, props) => { function getValidClaim(testUri) { claim = makeSelectClaimForUri(testUri)(state); - if (claim === null) { + if (claim === null && punctuationMarks.includes(testUri.charAt(testUri.length - 1))) { getValidClaim(testUri.substring(0, testUri.length - 1)); } else { uri = testUri; diff --git a/ui/util/remark-lbry.js b/ui/util/remark-lbry.js index fc8bb17e6..ad0ea9145 100644 --- a/ui/util/remark-lbry.js +++ b/ui/util/remark-lbry.js @@ -3,7 +3,7 @@ import visit from 'unist-util-visit'; const protocol = 'lbry://'; const uriRegex = /(lbry:\/\/)[^\s"]*[^)]/g; -const punctuationMarks = [',', '.', '!', '?', ':', ';', '-', ']', ')', '}']; +export const punctuationMarks = [',', '.', '!', '?', ':', ';', '-', ']', ')', '}']; const mentionToken = '@'; // const mentionTokenCode = 64; // @