code: private boolean useTargetContext(InternalLinkResolverOptions options) {
      if (options.isUseTargetContext() && !options.isRewritePathToContext()) {
        return true;
      }
      // even is use target context is not activated use it if current page is an experience fragment
      // otherwise it will be always impossible to resolve internal links
      else if (currentPage != null && Path.isExperienceFragmentPath(currentPage.getPath())) {
        return true;
      }
      return false;
    }
docs: Checks if target context should be used.
  @param options Link resolver options
  @return true if target context should be used