Generate url for navigation link href
3076
function(suffix) {
    if ( suffix.match(/^([a-z]*:?\d*)\/\//) ) { return suffix; }
    var base =  this.enablePushState ? this.baseUrl : '#/';
    return  base + suffix.replace(/^\//,'');
  }
364072
def links(cls, page):
    """"""
    for match in cls.HREF_RE.finditer(page):
      yield cls.href_match_to_url(match)
143632
function buildHTML(navigation, first, sParentLink) {
    return '<ul class="nav' + (first ? ' sidenav' : '') + '">' + navigation.map(function(loc) {

      if (!loc || !loc.link) return '';
      loc.link = (opts.parentLink && sParentLink ? sParentLink + '-' : '') + loc.link;
      loc.$ele.attr('id', loc.link);

      return '<li><a href="#' + loc.link + '">' + escape(loc.text) + '</a>' + (loc.children ? buildHTML(loc.children, false, loc.link) : '') + '</li>';
    }).join('\n') + '</ul>';
  }
108606
private static URI createBare(final URI link) {
        final URI uri;
        if (link.getRawQuery() == null && link.getRawFragment() == null) {
            uri = link;
        } else {
            final String href = link.toString();
            final int idx;
            if (link.getRawQuery() == null) {
                idx = href.indexOf('#');
            } else {
                idx = href.indexOf('?');
            }
            uri = URI.create(href.substring(0, idx));
        }
        return uri;
    }
457922
function(url, base) {
			if (!url || url.indexOf('://') !== -1) { return url; }

			var anchor = document.createElement('a');
			anchor.href = (base || location.href);

			var protocol	= anchor.protocol + '//',
				host		= anchor.host,
				path		= anchor.pathname,
				parts		= filter(path.split('/'), function(part) { return part !== ''; });

			each(url.replace(/\?.*/, '').split('/'), function(part, index) {
				switch(part) {
					case '..':
						if (!parts.length) {
							throw new Error('Path outside of root: ' + url);
						}
						parts.length--;
						break;
					case '.':	break;
					default:	parts.push(part); break
				}
			});
			return protocol + host + '/' + parts.join('/');
		}
431339
def _url_to(self, page):
        
        anchor = ""
        if "#" in page:
            page, anchor = page.split("#")
            anchor = "#" + anchor
        meta = self._get_page_meta(page)
        return meta.get("url")
351868
def generate_url(scheme=None, host=None, port=None, path=None, query=None):
    
    url = ""
    if scheme is not None:
        url += "%s://" % scheme
    if host is not None:
        url += host
    if port is not None:
        url += ":%s" % str(port)
    if path is not None:
        url += ensure_url_path_starts_with_slash(path)
    if query is not None:
        url += "?%s" % (urlencode(query))
    return url
832598
def get_html_link(self, obj):
        
        return "<a href='{}'>{}</a>".format(api.get_url(obj), api.get_id(obj))
512633
def menu_routing(menuOption) 

			# create a hash of the menu option id
			existingData = make_hash menuOption.custom_data

			# create generic variables
			home_id = Setting.get('home_page')	
			article_url = Setting.get('articles_slug')	
			category_url = Setting.get('category_slug')	
			tag_url = Setting.get('tag_slug')	
			
			# start the string by defining the target 
			atts = get_target(existingData['target'])
			p = Post.find_by_id(existingData['linkto'])
			blog = false

			if menuOption.data_type == 'page' && !p.blank?
				
				url = p.id == home_id.to_i ? site_url() : site_url(p.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'article' && !p.blank?

				url = site_url(article_url +  p.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'category'

				t = Term.find(existingData['linkto'])
				url = site_url(article_url + '/' + category_url + t.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'tag'

				t = Term.find(existingData['linkto'])
				url = site_url(article_url + '/' + tag_url + t.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == article_url && menuOption.option_id == 0 

				url = site_url(article_url)
				atts += " href='#{url}' class='menu_link'"
				blog = true

			elsif menuOption.data_type == 'custom'

				url = existingData['customlink']
				atts += " href='#{url}' class='menu_link'"

			end

			atts = (atts[0..-2] + " #{existingData['class']}'") if !existingData['class'].blank?

			if blog && request.original_url.include?(url)
				atts = (atts[0..-2] + " active'") 	
			else
				atts = (atts[0..-2] + " active'") if url == request.original_url
			end


			atts

		end
811710
function NavLink({
  "aria-current": ariaCurrent = "page",
  activeClassName = "active",
  activeStyle,
  className: classNameProp,
  exact,
  isActive: isActiveProp,
  location,
  strict,
  style: styleProp,
  to,
  ...rest
}) {
  const path = typeof to === "object" ? to.pathname : to;

  // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
  const escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");

  return (
    <Route
      path={escapedPath}
      exact={exact}
      strict={strict}
      location={location}
      children={({ location, match }) => {
        const isActive = !!(isActiveProp
          ? isActiveProp(match, location)
          : match);

        const className = isActive
          ? joinClassnames(classNameProp, activeClassName)
          : classNameProp;
        const style = isActive ? { ...styleProp, ...activeStyle } : styleProp;

        return (
          <Link
            aria-current={(isActive && ariaCurrent) || null}
            className={className}
            style={style}
            to={to}
            {...rest}
          />
        );
      }}
    />
  );
}
705699
function genRoute(path, breadcrumbName, baseComponent, parentPath) {
  return {
    path,
    exact: true,
    baseComponent,
    breadcrumbName,
    parentPath
  }
}
1135420
public function generatePageNavigationUrl()
    {
        if ((\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive() && ($oManufacturer = $this->getActManufacturer()))) {
            return $oManufacturer->getLink();
        } else {
            return parent::generatePageNavigationUrl();
        }
    }
895364
function createLink(link) {
        var $link = $('<a>').addClass(CSS_CLASS_PAGE_LINK),
            left = link.bbox[0],
            top = link.bbox[1],
            attr = {};

        if (browser.ie) {
            // @NOTE: IE doesn't allow override of ctrl+click on anchor tags,
            // but there is a workaround to add a child element (which triggers
            // the onclick event first)
            $('<span>')
                .appendTo($link)
                .on('click', handleClick);
        }

        $link.css({
            left: left + 'pt',
            top: top + 'pt',
            width: link.bbox[2] - left + 'pt',
            height: link.bbox[3] - top + 'pt'
        });

        if (link.uri) {
            if (/^http|^mailto/.test(link.uri)) {
                attr.href = encodeURI(link.uri);
                attr.target = '_blank';
                attr.rel = 'noreferrer'; // strip referrer for privacy
            } else {
                // don't embed this link... we don't trust the protocol
                return;
            }
        } else if (link.destination) {
            attr.href = '#page-' + link.destination.pagenum;
        }

        $link.attr(attr);
        $link.data('link', link);
        $link.appendTo($el);
    }
453
def url(self, url):
        
        if url is None:
            return
        el_FLocat = self._el.find('mets:FLocat', NS)
        if el_FLocat is None:
            el_FLocat = ET.SubElement(self._el, TAG_METS_FLOCAT)
        el_FLocat.set("{%s}href" % NS["xlink"], url)
292
function link(node, href) {
  var self = this
  var value = 'children' in node ? self.all(node).join('') : node.alt
  var url = escape(typeof href === 'string' ? href : node.url || '')
  var head

  if (url && url.slice(0, mailto.length) === mailto) {
    url = url.slice(mailto.length)
  }

  head = url.charAt(0) === '#' && self.headings[url.slice(1)]

  if (head) {
    url = '(' + escape(toString(head)) + ')'
  } else {
    if (value && escape(url) === value) {
      value = ''
    }

    if (url) {
      url = '\\(la' + escape(url) + '\\(ra'
    }
  }

  if (value) {
    value = bold.call(self, value)

    if (url) {
      value += ' '
    }
  }

  return value + (url ? italic.call(self, url) : '')
}
190390
function getPathFromBase(href) {
  return base[0] == '#'
    ? (href || loc.href).split(base)[1] || ''
    : getPathFromRoot(href)[REPLACE](base, '')
}
609992
protected Resource<?> generateNavigation(final String targetDir)
            throws IOException
   {
      WebResourcesFacet web = this.project.getFacet(WebResourcesFacet.class);
      HtmlTag unorderedList = new HtmlTag("ul");

      ResourceFilter filter = new ResourceFilter()
      {
         @Override
         public boolean accept(Resource<?> resource)
         {
            FileResource<?> file = (FileResource<?>) resource;

            if (!file.isDirectory()
                     || file.getName().equals("resources")
                     || file.getName().equals("WEB-INF")
                     || file.getName().equals("META-INF"))
            {
               return false;
            }

            return true;
         }
      };

      for (Resource<?> resource : web.getWebResource(targetDir + "/").listResources(filter))
      {
         HtmlOutcomeTargetLink outcomeTargetLink = new HtmlOutcomeTargetLink();
         String outcome = targetDir.isEmpty() || targetDir.startsWith("/") ? targetDir : "/" + targetDir;
         outcomeTargetLink.putAttribute("outcome", outcome + "/" + resource.getName() + "/search");
         outcomeTargetLink.setValue(StringUtils.uncamelCase(resource.getName()));

         HtmlTag listItem = new HtmlTag("li");
         listItem.getChildren().add(outcomeTargetLink);
         unorderedList.getChildren().add(listItem);
      }

      Writer writer = new IndentedWriter(new StringWriter(), this.navigationTemplateIndent);
      unorderedList.write(writer);

      Map<Object, Object> context = CollectionUtils.newHashMap();
      context.put("appName", StringUtils.uncamelCase(this.project.getRoot().getName()));
      context.put("navigation", writer.toString().trim());
      context.put("targetDir", targetDir);

      if (this.navigationTemplate == null)
      {
         loadTemplates();
      }

      try
      {
         return ScaffoldUtil.createOrOverwrite((FileResource<?>) getTemplateStrategy()
                  .getDefaultTemplate(),
                  FreemarkerTemplateProcessor.processTemplate(context, navigationTemplate));
      }
      finally
      {
         writer.close();
      }
   }