nl_tokens: Determine whether a URL is internal .
pl_tokens: function isInternalLink ( url , host ) { const parsedUrl = urlMethods . <mask> ( url , false , true ) ; // Check if the URL starts with a single slash. if ( url . indexOf ( "//" ) === - 1 && url . indexOf ( "/" ) === 0 ) { return true ; } // Check if the URL starts with a # indicating a fragment. if ( url . indexOf ( "#" ) === 0 ) { return false ; } // No host indicates an internal link. if ( ! parsedUrl . host ) { return true ; } return parsedUrl . host === host ; }