Get name - will be wrapped in anchor HTML if $linkl isset
179217
public function GetNamedLink($name, $link, $target = null)
    {
        $result = '';
        if (strlen($name) != 0) {
            $result = $name;
            if (strlen($link) != 0) {
                $result = "<a href=\"".$link."\"".(is_null($target) ? "" : " target=\"".$target."\"").">".$result."</a>";
            }
        }
        return $result;
    }
241848
function (name) {
    // pre-test to improve performance
    if (REGEXP_IS_ESCAPED.test(name)) {
        name = name.replace(REGEXP_DOT, '.');
        name = name.replace(REGEXP_DOLLAR, '$');
        name = name.replace(REGEXP_TO_BSON, 'toBSON');
        name = name.replace(REGEXP_BSON_TYPE, '_bsontype');
    }

    return name;
}
133855
public function fullName(bool $link = false): string
    {
        if ($this->parts->isEmpty()) {
            return '';
        }

        $full_name = $this->parts->implode(I18N::$list_separator);

        if ($link) {
            return '<a dir="auto" href="' . e($this->url()) . '">' . e($full_name) . '</a>';
        }

        return '<span dir="auto">' . e($full_name) . '</span>';
    }
786108
def name(self):
        
        if self.m_name == -1 or (self.m_event != const.START_TAG and self.m_event != const.END_TAG):
            return u''

        return self.sb[self.m_name]
65218
public function getChainedNameAttribute(): string
    {
        $categories = $this->breadcrumbLinks;
        $names = [];

        foreach ($categories as $url => $categoryName) {
            $names[] = $categoryName;
        }

        return implode(' -> ', $names);
    }
837566
function getElementFromObject(attachTo) {
  const op = attachTo.element;

  if (op instanceof HTMLElement) {
    return op;
  }

  return document.querySelector(op);
}
1203923
def track_binding_anchors
      @binding_anchors = {}

      # Loop through the bindings, find in nodes.
      @bindings.each_pair do |name, binding|
        if name.is_a?(String)
          # Find the dom node for an attribute anchor
          node = nil
          `
            node = self.nodes.querySelector('#' + name);
          `
          @binding_anchors[name] = node
        else
          # Find the dom node for a comment anchor
          start_comment = find_by_comment("$#{name}", @nodes)
          end_comment   = find_by_comment("$/#{name}", @nodes)

          @binding_anchors[name] = [start_comment, end_comment]
        end
      end
    end
356661
def anchor
      name, anchor_mark = @data.split(/,\s*/o, 2)
      anchor_mark = "_" if (anchor_mark.nil? or anchor_mark.empty?)
      HtmlElement.create("a", anchor_mark,
                         "name" => name,
                         "href" => "#" + name)
    end
1287735
def iter_links_param_element(cls, element):
        ''''''
        valuetype = element.attrib.get('valuetype', '')

        if valuetype.lower() == 'ref' and 'value' in element.attrib:
            link_type = identify_link_type(element.attrib.get('value'))

            yield LinkInfo(
                element=element, tag=element.tag, attrib='value',
                link=element.attrib.get('value'),
                inline=True, linked=False,
                base_link=None,
                value_type='plain',
                link_type=link_type
            )
1085427
def _object_name_html(self):
        
        if self.presently.exists:
            url = self.url()
            return "<a href=\"%s\">%s</a>" % (url,
                                              unicode(self.get_object()),)
        else:
            return "(deleted)"
146800
def link_href(self, rel):
        """"""
        link = self.link(rel)
        if (link is not None):
            link = link['href']
        return(link)
1344679
def get(name):
    ''''''
    linkcheckers = get_enabled(ENTRYPOINT, current_app)
    linkcheckers.update(no_check=NoCheckLinkchecker)  # no_check always enabled
    selected_linkchecker = linkcheckers.get(name)
    if not selected_linkchecker:
        default_linkchecker = current_app.config.get(
                                'LINKCHECKING_DEFAULT_LINKCHECKER')
        selected_linkchecker = linkcheckers.get(default_linkchecker)
    if not selected_linkchecker:
        log.error('No linkchecker found ({} requested and no fallback)'.format(
                  name))
    return selected_linkchecker
407106
function parseLinkHeader (link) {
  if (!link) {
    return {}
  }

  let linkexp = /<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g
  let paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g
  let matches = link.match(linkexp)
  let rels = {}

  for (let i = 0; i < matches.length; i++) {
    let split = matches[i].split('>')
    let href = split[0].substring(1)
    let ps = split[1]
    let s = ps.match(paramexp)

    for (let j = 0; j < s.length; j++) {
      let p = s[j]
      let paramsplit = p.split('=')
      // var name = paramsplit[0]
      let rel = paramsplit[1].replace(/["']/g, '')

      if (!rels[rel]) {
        rels[rel] = []
      }

      rels[rel].push(href)

      if (rels[rel].length > 1) {
        rels[rel].sort()
      }
    }
  }

  return rels
}
998150
def search_name(self, name, dom=None):
        """"""
        if dom is None:
            dom = self.browser
        return expect(dom.find_by_name, args=[name])
136813
def get_anchor_point(self, anchor_name):
        """"""

        if anchor_name in self._possible_anchors:
            return TikZNodeAnchor(self.handle, anchor_name)
        else:
            try:
                anchor = int(anchor_name.split('_')[1])
            except:
                anchor = None

            if anchor is not None:
                return TikZNodeAnchor(self.handle, str(anchor))

        raise ValueError('Invalid anchor name: "{}"'.format(anchor_name))
895172
public function shortName(bool $link = false): string
    {
        $SHOW_PEDIGREE_PLACES = (int) $this->tree->getPreference('SHOW_PEDIGREE_PLACES');

        // Abbreviate the place name, for lists
        if ($this->tree->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX')) {
            $parts = $this->lastParts($SHOW_PEDIGREE_PLACES);
        } else {
            $parts = $this->firstParts($SHOW_PEDIGREE_PLACES);
        }

        $short_name = $parts->implode(I18N::$list_separator);

        // Add a tool-tip showing the full name
        $title = strip_tags($this->fullName());

        if ($link) {
            return '<a dir="auto" href="' . e($this->url()) . '" title="' . $title . '"">' . e($short_name) . '</a>';
        }

        return '<span dir="auto">' . e($short_name) . '</span>';
    }
778572
def name(self):
        
        name = self._element.name_val
        if name is None:
            return None
        return BabelFish.internal2ui(name)