File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ module.exports = {
296296 if ( node . title ?. startsWith ( 'Direct link to' ) ) return '' ;
297297
298298 const parsedUrl = parse ( node . url ) ;
299- const isUrlInternal = isInternal ( parsedUrl ) ;
299+ const isUrlInternal = isInternal ( parsedUrl , config . absoluteUrl ) ;
300300 const url = isUrlInternal ? `${ config . absoluteUrl } ${ parsedUrl . pathname } .md` : node . url ;
301301
302302 if ( isUrlInternal && ! parsedUrl . pathname ) return '' ;
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ const internalUrl = 'docs.apify.com';
77/**
88 * @param {import('url').UrlWithStringQuery } href
99 */
10- exports . isInternal = ( href ) => {
11- return href . host === internalUrl || ( ! href . protocol && ! href . host && ( href . pathname || href . hash ) ) ;
10+ exports . isInternal = ( href , hostName ) => {
11+ return href . host === hostName || ( ! href . protocol && ! href . host && ( href . pathname || href . hash ) ) ;
1212} ;
1313
1414/**
@@ -24,7 +24,7 @@ exports.externalLinkProcessor = () => {
2424 ) {
2525 const href = parse ( node . properties . href ) ;
2626
27- if ( ! exports . isInternal ( href ) ) {
27+ if ( ! exports . isInternal ( href , internalUrl ) ) {
2828 node . properties . target = '_blank' ;
2929 node . properties . rel = 'noopener' ;
3030 } else {
You can’t perform that action at this time.
0 commit comments