handle iris.to links internally

This commit is contained in:
Martti Malmi 2023-02-08 20:32:11 +02:00
parent 095aff6876
commit ce5529f80e

View File

@ -156,11 +156,7 @@ export default {
});
replacedText = reactStringReplace(replacedText, /(https?:\/\/\S*[^.?,)\s])/gi, (match, i) => (
<a
key={match + i}
href={match}
target={match.startsWith('https://iris.to') ? '_self' : '_blank'}
>
<a key={match + i} href={match.replace(/^https:\/\/iris.to/, '')}>
{match}
</a>
));