Implements the 'link' snippet
164919
public function link($link, $text=null, $title=null, $popup=false, $class=null) {
		if (is_null($text)) {
			// if no text is given, we use the text originally provided by the user
			$text = $link;
		}

		// deal with internal and (slightly) malformed links
		$link = $this->getLink($link);

		$attributes = $this->getHtmlAttributes(array(
			'title'=>$title,
			'target'=>$this->isTrue($popup)?"blank":null,
			'class'=>$class
		));

		return "<a href='$link'$attributes>$text</a>";
	}
264953
def add_link(self, rel, value, href=None):
        
        links_node = self.metadata.find('links')
        if links_node is None:
            links_node = ioc_et.make_links_node()
            self.metadata.append(links_node)
        link_node = ioc_et.make_link_node(rel, value, href)
        links_node.append(link_node)
        return True
660575
def make_link(title, url, blank=False):
	
	attrs = 'href="%s"' % url
	if blank:
		attrs += ' target="_blank" rel="noopener noreferrer"'
	return '<a %s>%s</a>' % (attrs, title)
643586
def insert(text)
      raise "must be passed string" unless text.is_a?(String)

      snippet = Snippet.new_text(core, text)
      snippet.snippet_tags.each do |tag_info|
        visit tag_info[:tag]
      end

      context = Context.new(nil)
      insert_func(snippet, context).join($/)
    end
650464
def link(rel, uri, attributes = {})
      headers['Link'] ||= []
      attributes = {:rel => rel}.merge(attributes)
      link = "<#{uri}>"
      attributes.each_pair { |k, v| link << "; #{k}=\"#{v}\"" }
      headers['Link'] << link
    end
415186
def link(self):
        '''
        
        '''
        link = None
        for widget in self.widgets:
            if widget.place == 'entry-link':
                link = widget
        return link
966660
function (el, links) {
            $el = $(el);
            this.createLinks(links);
            if (!browser.ie) {
                // @NOTE: event handlers are individually bound in IE, because
                // the ctrl+click workaround fails when using event delegation
                $el.on('click', '.' + CSS_CLASS_PAGE_LINK, handleClick);
            }
        }
166218
function(text, link) {
    var href = link.url
      , external = link.external || this.options.externalLinks;
    if (!href)
      href = link.toString();
    this.out.push("<a href=\"" + href + "\"");
    if (link.title)
      this.out.push(" title=\"" + escapeHtml(link.title) + "\"");
    if (external)
      this.out.push(" target=\"_blank\"");
    // Link text is rendered separately with the same options
    var html = new InlineCompiler(this.options).toHtml(text);
    this.out.push(">" + html + "</a>");
  }
1074559
public static Link link(String href, String rel) {
        return link(href, rel, null, null, null);
    }
690635
function (links) {
            var i, len;
            for (i = 0, len = links.length; i < len; ++i) {
                createLink(links[i]);
            }
        }
50580
def get_snippet(context, tag)
      ::SocialSnippet::Snippet.new(core, resolve_snippet_path(context, tag))
    end
321235
function(l) {
    debug('Attaching link ' + l.name + ':' + l.handle + ' after begin received');
    if (l.state() !== 'attached' && l.state() !== 'attaching') l.attach();
  }
470886
function link(href, title, text) {

  var reLabelFirst = /^(.*?)\s*\?([^?\s]*)\?(\*?)(X?)(H?)$/;
  var reLabelAfter = /^\?([^?\s]*)\?(\*?)(X?)(H?)\s*(.*)$/;

  var m = text.match(reLabelFirst);
  if (m) return renderInput(m[1], m[2], m[3], m[4], m[5], href, title, true);

  m = text.match(reLabelAfter);
  if (m) return renderInput(m[5], m[1], m[2], m[3], m[4], href, title, false);

  return fallback.link.call(this, href, title, text);
}
1181740
def visit_snippet(self, node):
    
    lang = self.highlightlang
    linenos = node.rawsource.count('\n') >= self.highlightlinenothreshold - 1
    fname = node['filename']
    highlight_args = node.get('highlight_args', {})
    if 'language' in node:
        # code-block directives
        lang = node['language']
        highlight_args['force'] = True
    if 'linenos' in node:
        linenos = node['linenos']

    def warner(msg):
        self.builder.warn(msg, (self.builder.current_docname, node.line))

    highlighted = self.highlighter.highlight_block(node.rawsource, lang,
                                                   warn=warner,
                                                   linenos=linenos,
                                                   **highlight_args)
    starttag = self.starttag(node, 'div', suffix='',
                             CLASS='highlight-%s snippet' % lang)
    self.body.append(starttag)
    self.body.append('<div class="snippet-filename">%s</div>\n''' % (fname,))
    self.body.append(highlighted)
    self.body.append('</div>\n')
    raise nodes.SkipNode
1279617
function Snippet(file) {
  if (!(this instanceof Snippet)) {
    return new Snippet(file);
  }
  if (typeof file === 'string') {
    file = {path: file};
  }

  this.history = [];

  if (typeof file === 'object') {
    this.visit('set', file);
  }

  this.cwd = this.cwd || process.cwd();
  this.content = this.content || null;
  this.options = this.options || {};
}
438305
def follow(link, scope={})
      in_scope(scope) do
        begin
          click_link(link)
        rescue Capybara::ElementNotFound
          raise Kelp::MissingLink,
            "No link with title, id or text '#{link}' found"
        end
      end
    end
281273
function Link(props) {

  // Handle clicks of the link
  const onClick = e => {
    e.preventDefault();
    routeTo(path);
  };

  // If link is for a new tab
  if(props.openIn === 'new') {
    return (
      <a href={props.to} target="_blank" rel="noopener noreferrer">
        {props.children}
      </a>
    );
  }

  return (
    <a href={props.to} onClick={onClick}>
      {props.children}
    </a>
  );
}