From 531949d2a9d86c706fc38d5c324102f82e6b85da Mon Sep 17 00:00:00 2001 From: Paul Hibbitts Date: Fri, 24 May 2024 09:24:35 -0700 Subject: [PATCH] Do not overwrite existing target attribute in Markdown links.. --- docs/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index f8181159..ef553db2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -978,7 +978,9 @@ } else { // Set '_top' as external link targets except for docsify-this.net and GitHub Docsify-This repository if (link.href !== "https://docsify-this.net/" && link.href !== "https://github.com/hibbitts-design/docsify-open-publishing-starter-kit") { - link.setAttribute('target', '_top'); + if (!link.hasAttribute('target')) { + link.setAttribute('target', '_top'); + } } } }