Structure handler for 'custom' tag.
769777
function structHandlerCustom( $element, &$params )
    {
        $ret = null;
        if ( $this->XMLSchema->isInline( $element ) )
        {
            $ret = $this->appendLineParagraph( $element, $params );
        }
        else
        {
            $ret = $this->appendParagraph( $element, $params );
        }
        return $ret;
    }
978350
def tagged(*tags: Tags) -> Callable:
    global GREENSIM_TAG_ATTRIBUTE
    
    def hook(event: Callable):
        def wrapper(*args, **kwargs):
            event(*args, **kwargs)
        setattr(wrapper, GREENSIM_TAG_ATTRIBUTE, tags)
        return wrapper
    return hook
636272
def handle_starttag(self, tag, attrs):
        """"""
        if (tag in self.newline_before_elements):
            self.text += '\n'
        if (tag in self.stroke_before_elements and not
                self.text.endswith(self.stroke_text)):
            # Put a stroke in front of every relevant element, if there is some
            # content between it and its predecessor
            self.text += self.stroke_text
        if tag == 'a':
            # If it's a link, append it to the link list
            for attr in attrs:
                if attr[0] == 'href':
                    self.links.append((len(self.links) + 1, attr[1]))
837910
protected function handleTag_td()
    {
        if ($this->parser->isStartTag) {
            $this->col++;
            if (!isset($this->table['col_widths'][$this->col])) {
                $this->table['col_widths'][$this->col] = 0;
            }
            $this->buffer();
        } else {
            $buffer = trim($this->unbuffer());
            if (!isset($this->table['col_widths'][$this->col])) {
                $this->table['col_widths'][$this->col] = 0;
            }
            $this->table['col_widths'][$this->col] = max($this->table['col_widths'][$this->col], $this->strlen($buffer));
            $this->table['rows'][$this->row][$this->col] = $buffer;
        }
    }
583762
def handle(self, tag, data):
        

        if self.is_end(tag):
            self.postprocess_entry()

        if self.is_start(tag):
            self.new_entry()

        if not data or not tag:
            return

        if getattr(self, 'parse_only', None) and tag not in self.parse_only:
            return

        # TODO: revisit encoding here.
        if isinstance(data, unicode):
            data = unicodedata.normalize('NFKD', data)#.encode('utf-8','ignore')

        handler = self._get_handler(tag)
        if handler is not None:
            data = handler(data)

        if tag in self.tags:    # Rename the field.
            tag = self.tags[tag]

        # Multiline fields are represented as lists of values.
        if hasattr(self.data[-1], tag):
            value = getattr(self.data[-1], tag)
            if tag in self.concat_fields:
                value = ' '.join([value, unicode(data)])
            elif type(value) is list:
                value.append(data)
            elif value not in [None, '']:
                value = [value, data]
        else:
            value = data
        setattr(self.data[-1], tag, value)
        self.fields.add(tag)
875842
def handle_endtag(self, tag):
        """"""
        if tag in self.stroke_after_elements:
            if self.text.endswith(self.stroke_text):
                # Only add a stroke if there isn't already a stroke posted
                # In this case, there was no content between the tags, so
                # remove the starting stroke
                self.text = self.text[:-len(self.stroke_text)]
            else:
                # If there's no linebreak before the stroke, add one!
                if not self.text.endswith('\n'):
                    self.text += '\n'
                self.text += self.stroke_text
        if tag == 'a':
            # If it's a link, add a footnote
            self.text += '[{}]'.format(len(self.links))
        elif tag == 'br' and self.text and not self.text.endswith('\n'):
            # If it's a break, check if there's no break at the end of the
            # content. If there's none, add one!
            self.text += '\n'
        # Reset the lasttag, otherwise this parse can geht confused, if the
        # next element is not wrapped in a new tag.
        if tag == self.lasttag:
            self.lasttag = None
1246673
private void processTag(boolean start) {
    	if (start) {
    		nested++;
    		doc.startElement(tag,attributes);
    	}
    	else {
            nested--;
            doc.endElement(tag);
    	}
    }
1149264
function(value) {
      // avoid to override the tag properties already set
      if (contains(keys, key)) return
      // check whether this value is an array
      isArr = isArray(value)
      // if the key was never set
      if (!value)
        // set it once on the tag instance
        parent[key] = dom
      // if it was an array and not yet set
      else if (!isArr || isArr && !contains(value, dom)) {
        // add the dom node into the array
        if (isArr)
          value.push(dom)
        else
          parent[key] = [value, dom]
      }
    }
276555
def tag(self, tags):
        
        # Get tag list and add/remove given tags
        tags = tags.lower()
        previous = self.tagged
        tagset = previous.copy()
        for tag in tags.replace(',', ' ').split():
            if tag.startswith('-'):
                tagset.discard(tag[1:])
            elif tag.startswith('+'):
                tagset.add(tag[1:])
            else:
                tagset.add(tag)

        # Write back new tagset, if changed
        tagset.discard('')
        if tagset != previous:
            tagset = ' '.join(sorted(tagset))
            self._make_it_so("setting tags %r on" % (tagset,), ["custom.set"], "tags", tagset)
            self._fields["custom_tags"] = tagset
1169837
private void initCustomTaglets() {

        moduleTags = new ArrayList<>();
        packageTags = new ArrayList<>();
        typeTags = new ArrayList<>();
        fieldTags = new ArrayList<>();
        constructorTags = new ArrayList<>();
        methodTags = new ArrayList<>();
        inlineTags = new ArrayList<>();
        overviewTags = new ArrayList<>();

        for (Taglet current : customTags.values()) {
            if (current.inModule() && !current.isInlineTag()) {
                moduleTags.add(current);
            }
            if (current.inPackage() && !current.isInlineTag()) {
                packageTags.add(current);
            }
            if (current.inType() && !current.isInlineTag()) {
                typeTags.add(current);
            }
            if (current.inField() && !current.isInlineTag()) {
                fieldTags.add(current);
            }
            if (current.inConstructor() && !current.isInlineTag()) {
                constructorTags.add(current);
            }
            if (current.inMethod() && !current.isInlineTag()) {
                methodTags.add(current);
            }
            if (current.isInlineTag()) {
                inlineTags.add(current);
            }
            if (current.inOverview() && !current.isInlineTag()) {
                overviewTags.add(current);
            }
        }

        //Init the serialized form tags
        serializedFormTags = new ArrayList<>();
        serializedFormTags.add(customTags.get(SERIAL_DATA.tagName));
        serializedFormTags.add(customTags.get(THROWS.tagName));
        if (!nosince)
            serializedFormTags.add(customTags.get(SINCE.tagName));
        serializedFormTags.add(customTags.get(SEE.tagName));
    }
1224050
def _parse_parameter(tag, parser, parent):
    """"""
    name, modifiers, dtype, kind = _parse_common(tag)
    if "default" in tag.attrib:
        default = tag.attrib["default"]
    else:
        default = None
    if "dimension" in tag.attrib:
        dimension = tag.attrib["dimension"]
    else:
        dimension = None

    result = ValueElement(name, modifiers, dtype, kind, default, dimension, parent)
    doc = DocElement(tag, parser, result)
    result.docstring.append(doc)
    parent.add_parameter(result)
537165
def _handle_tag(self, token):
        """"""
        close_tokens = (tokens.TagCloseSelfclose, tokens.TagCloseClose)
        implicit, attrs, contents, closing_tag = False, [], None, None
        wiki_markup, invalid = token.wiki_markup, token.invalid or False
        wiki_style_separator, closing_wiki_markup = None, wiki_markup
        self._push()
        while self._tokens:
            token = self._tokens.pop()
            if isinstance(token, tokens.TagAttrStart):
                attrs.append(self._handle_attribute(token))
            elif isinstance(token, tokens.TagCloseOpen):
                wiki_style_separator = token.wiki_markup
                padding = token.padding or ""
                tag = self._pop()
                self._push()
            elif isinstance(token, tokens.TagOpenClose):
                closing_wiki_markup = token.wiki_markup
                contents = self._pop()
                self._push()
            elif isinstance(token, close_tokens):
                if isinstance(token, tokens.TagCloseSelfclose):
                    closing_wiki_markup = token.wiki_markup
                    tag = self._pop()
                    self_closing = True
                    padding = token.padding or ""
                    implicit = token.implicit or False
                else:
                    self_closing = False
                    closing_tag = self._pop()
                return Tag(tag, contents, attrs, wiki_markup, self_closing,
                           invalid, implicit, padding, closing_tag,
                           wiki_style_separator, closing_wiki_markup)
            else:
                self._write(self._handle_token(token))
        raise ParserError("_handle_tag() missed a close token")
1088848
def handle_tags(repo, **kwargs):
    """"""
    log.info('tags: %s %s' %(repo, kwargs))
    return [str(t) for t in repo.tags(**kwargs)]
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
1201308
def _handle_tag(self, tag, attrs, self_closing):
        

        if tag.lower() == 'img':
            attrs = self._image_attrs(attrs)

        # Remap the attributes
        out_attrs = []
        for key, val in attrs:
            if (key.lower() == 'href'
                    or (key.lower() == 'src' and not tag.lower() == 'img')):
                out_attrs.append((key, links.resolve(
                    val, self._search_path, self._config.get('absolute'))))
            else:
                out_attrs.append((key, val))

        self.append(
            utils.make_tag(
                tag,
                out_attrs,
                self_closing))
1308278
protected function handleTag_a_parser()
    {
        if (isset($this->parser->tagAttributes['title'])) {
            $this->parser->tagAttributes['title'] = $this->decode($this->parser->tagAttributes['title']);
        } else {
            $this->parser->tagAttributes['title'] = null;
        }
        $this->parser->tagAttributes['href'] = $this->decode(trim($this->parser->tagAttributes['href']));
    }
1302951
private void popUIComponentClassicTagBase() {
        List list = (List) context.getAttributes().get(COMPONENT_TAG_STACK_ATTR);

        // if an exception occurred in a nested  tag,
        //there could be a few tags left in the stack.
        UIComponentClassicTagBase uic = null;
        while (list != null && uic != this) {
            int idx = list.size() - 1;
            uic = (UIComponentClassicTagBase) list.get(idx);
            list.remove(idx);
            if (idx < 1) {
                context.getAttributes().remove(COMPONENT_TAG_STACK_ATTR);
                list = null;
            }
        }
    }