Skip to content

Commit

Permalink
Do not overwrite existing target attribute in Markdown links..
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhibbitts committed May 24, 2024
1 parent 6bba5d6 commit 531949d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
}
}
Expand Down

0 comments on commit 531949d

Please sign in to comment.