Check link isExternal before adding target="_blank" (#1211)
Fixes #1186 openLinksInNewTab opens ALL links in new tabs. Fixed to reflect documented behavior here: https://quartz.jzhao.xyz/plugins/CrawlLinks
This commit is contained in:
1 parent
3e14b2b89b
commit
42640bceb5
1 file changed
+1
-1
@@ -93,7 +93,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
|
||||
}
|
||||
node.properties.className = classes
|
||||
|
||||
if (opts.openLinksInNewTab) {
|
||||
if (isExternal && opts.openLinksInNewTab) {
|
||||
node.properties.target = "_blank"
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user