Handle subdomains on URLs

pull/1049/head
Jamie 2021-08-22 03:39:30 -07:00 committed by GitHub
parent af99c7e1fd
commit 7d937af8fc
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ export default function Renderer({ content, disallowBigEmoji }: MarkdownProps) {
try {
const url = new URL(href, location.href);
if (url.hostname === location.hostname) {
if (url.hostname.replace(/^[^.]+\./g, "") === location.hostname.replace(/^[^.]+\./g, "")) {
internal = true;
element.addEventListener(
"click",