utility methods to help us match elements in our tagset
335931
protected boolean isTag(String tagUri,
                            String tagLn,
                            String matchUri,
                            String matchLn) {
        if (tagUri == null
                || tagUri.length() == 0
                || tagLn == null
                || matchUri == null
                || matchLn == null) {
            return false;
        }
        // match beginning of URI since some suffix *_rt tags can
        // be nested in EL enabled tags as defined by the spec
        if (tagUri.length() > matchUri.length()) {
            return (tagUri.startsWith(matchUri) && tagLn.equals(matchLn));
        } else {
            return (matchUri.startsWith(tagUri) && tagLn.equals(matchLn));
        }
    }
1052537
def custom_filter_tags(self, value, search):
        """"""
        if not isinstance(value, list):
            value = value.split(',')

        filters = [Q('match', **{'tags': item}) for item in value]
        search = search.query('bool', must=filters)

        return search
720214
def tags(tag_references):
    """"""
    if not tag_references:
        return blank()

    tag_row = []
    for tag_detail in tag_references:
        tag = utils.lookup(tag_detail, 'tag', 'name')
        if tag is not None:
            tag_row.append(tag)

    return listing(tag_row, separator=', ')
637854
def _parse_tags(element):
    

    tags = []
    items = element.findall("./{%s}tag" % WP_NAMESPACE)

    for item in items:
        term_id = item.find("./{%s}term_id" % WP_NAMESPACE).text
        slug = item.find("./{%s}tag_slug" % WP_NAMESPACE).text
        name = item.find("./{%s}tag_name" % WP_NAMESPACE).text

        tag = {
            "term_id": term_id,
            "slug": slug,
            "name": name,
        }

        tags.append(tag)

    return tags
1080146
def find_all(self, tagtype):
        '''  '''
        return [t for t in self.__tags if t.tagtype == tagtype]
870064
def tags():
    ""
    result = [t.decode('ascii') for t in subprocess.check_output([
        'git', 'tag'
    ]).split(b"\n")]
    assert len(set(result)) == len(result)
    return set(result)
479477
function matchAt(content, index, match) {
  return content.substring(index, index + match.length) === match;
}
115322
def get_tags(doc):
    '''
    
    '''
    tags = list()

    for el in doc.getroot().iter():
        if isinstance(el, lxml.html.HtmlElement):
            tags.append(el.tag)
        elif isinstance(el, lxml.html.HtmlComment):
            tags.append('comment')
        else:
            raise ValueError('Don\'t know what to do with element: {}'.format(el))

    return tags
1134253
def _tag_matches(tags, filter):
        """"""
        for tag_name, tag_value in filter.items():
            # using _sentinel as I'm not sure that "None"
            # could be used, because it could be a valid
            # series_tags value : when a series has no such tag
            # then I think it's set to /null/None/.. TBC..
            series_tag_value = tags.get(tag_name, _sentinel)
            if series_tag_value != tag_value:
                return False

        return True
1073977
function taggedAs(taggedItem, name, namespace, namespaceEx) {
  var tags = taggedItem.tags || taggedItem.Tags;

  if (!namespace)                                           { return /* undefined */; }
  if (!tags)                                                { return /* undefined */; }

  // The new, improved way (item.namespace=foo && item[name]=value)
  if (tags.namespace === namespace) {
    if (name in tags)                                       { return tags[name]; }
  }

  if (tags[namespace]   && (name in tags[namespace]))       { return tags[namespace][name]; }

  if (!namespaceEx)                                         { return /* undefined */; }
  if (tags[namespaceEx] && (name in tags[namespaceEx]))     { return tags[namespaceEx][name]; }

  return /* undefined */;
}
1192742
def match_namespace(self, el, tag):
        """"""

        match = True
        namespace = self.get_tag_ns(el)
        default_namespace = self.namespaces.get('')
        tag_ns = '' if tag.prefix is None else self.namespaces.get(tag.prefix, None)
        # We must match the default namespace if one is not provided
        if tag.prefix is None and (default_namespace is not None and namespace != default_namespace):
            match = False
        # If we specified `|tag`, we must not have a namespace.
        elif (tag.prefix is not None and tag.prefix == '' and namespace):
            match = False
        # Verify prefix matches
        elif (
            tag.prefix and
            tag.prefix != '*' and (tag_ns is None or namespace != tag_ns)
        ):
            match = False
        return match
1348652
function tagSet(tags) {
    var e_1, _a;
    var res = {};
    try {
        for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(tags.split(',')), _c = _b.next(); !_c.done; _c = _b.next()) {
            var t = _c.value;
            res[t] = true;
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
        }
        finally { if (e_1) throw e_1.error; }
    }
    return res;
}
29477
def match(self, item):
        
        tags = getattr(item, self._name) or []
        if self._exact:
            # Equality check
            return self._value == set(tags)
        else:
            # Is given tag in list?
            return self._value in tags
512639
function tagMatcher($tag_name, $close_tags = null)
    {
        $expr = $this->_tag_expr;

        if ($close_tags) {
            $options = implode("|", array_merge(array($tag_name), $close_tags));
            $closer = sprintf("(?:%s)", $options);
        } else {
            $closer = $tag_name;
        }

        $expr = sprintf($expr, $tag_name, $closer);
        return sprintf("/%s/%s", $expr, $this->_re_flags);
    }
1065995
def tags(self, value): # pylint: disable-msg=E0102
        """"""
        if not isinstance(value, list):
            raise TypeError
        self._config['tags'] = value
351661
function parseTags(tags) {
    if (tags.length > 0 && util.isArray(tags[0])) {
        tags = tags[0];
    }

    return tags;
}
1088848
def handle_tags(repo, **kwargs):
    """"""
    log.info('tags: %s %s' %(repo, kwargs))
    return [str(t) for t in repo.tags(**kwargs)]