render.js
function rewriteLink(href, renderOpts) {
    var imgRoute = renderOpts.fqImages && (renderOpts.fqImages.route || '/images/');
    var imgPrefix = renderOpts.fqImages && renderOpts.fqImages.url;
    var linkPrefix = renderOpts.fqLinks || renderOpts.relPath;

    if (imgPrefix && u.startsWith(href, imgRoute)) { href = imgPrefix + href; }
    else if (linkPrefix && /^\/([^/]|$)/.test(href)) { href = linkPrefix + href; }

    return href;
  }
function rewriteLink(href, renderOpts) {
    var imgRoute = renderOpts.fqImages && (renderOpts.fqImages.route || '/images/');
    var imgPrefix = renderOpts.fqImages && renderOpts.fqImages.url;
    var linkPrefix = renderOpts.fqLinks || renderOpts.relPath;

    if (imgPrefix && u.startsWith(href, imgRoute)) { href = imgPrefix + href; }
    else if (linkPrefix && /^\/([^/]|$)/.test(href)) { href = linkPrefix + href; }

    return href;
  }
function rewriteLink ( href , renderOpts ) { var imgRoute = renderOpts . fqImages && ( renderOpts . fqImages . route || '/images/' ) ; var imgPrefix = renderOpts . fqImages && renderOpts . fqImages . url ; var linkPrefix = renderOpts . fqLinks || renderOpts . relPath ; if ( imgPrefix && u . startsWith ( href , imgRoute ) ) { href = imgPrefix + href ; } else if ( linkPrefix && / ^\/([^/]|$) / . test ( href ) ) { href = linkPrefix + href ; } return href ; }
Link rewriting logic - shared by renderLink and renderImage and hb.fixPath
Link rewriting logic - shared by renderLink and renderImage and hb . fixPath