Outputs one tag completely (open, contents and close)
323366
public function full_tag($tag, $content = null, $attributes = null) {
        $content = $this->text_content($content); // First of all, apply transformations
        $this->nullcontent = is_null($content) ? true : false; // Is it null content
        $this->begin_tag($tag, $attributes);
        if (!$this->nullcontent) {
            $this->write($content);
            $this->lastwastext = true;
            $this->end_tag($tag);
        }
    }
791499
def make_tabs(tag_ids, tag_status, tag_contents):
    
    templ = '''
<div id="tabs">
<ul>
%s
</ul>
%s
</div>'''
    lis = []
    contents = []
    for i, (tag_id, status, tag_content) in enumerate(
            zip(tag_ids, tag_status, tag_contents), 1):
        mark = '.' if status == 'complete' else '!'
        lis.append('<li><a href="#tabs-%d">%s%s</a></li>' % (i, tag_id, mark))
        contents.append('<div id="tabs-%d">%s</div>' % (
            i, tag_content))
    return templ % ('\n'.join(lis), '\n'.join(contents))
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")
796629
private static StringBuffer doAppendClosingTag(StringBuffer buffer, String tag)
	{
		buffer.append(SEQUENCE__TAG__BEGIN_CLOSING_TAG).append(tag).append(SEQUENCE__TAG__END_OF_TAG);
		return buffer;
	}
77715
function _tag_close( &$parser, $tag ) {
		$this->currentElement = '';

		switch( strtoupper( $tag ) ) {
			case 'TABLE':
				$this->parent->addSQL( $this->create( $this->parent ) );
				xml_set_object( $parser, $this->parent );
				$this->destroy();
				break;
			case 'FIELD':
				unset($this->current_field);
				break;

		}
	}
642834
function(html) {

		if (Lava.schema.DEBUG && this._is_void) Lava.t('Trying to wrap content in void tag');
		// _element is cleared in _renderOpeningTag
		return this._renderOpeningTag() + ">" + html + "</" + this._tag_name + ">";

	}
566404
public static String openTagClassHtmlContent(String tag, String clazz, String... content) {
		return openTagHtmlContent(tag, clazz, null, content);
	}
726938
function sh_insertTags(tags, text) {
  var doc = document;

  var result = document.createDocumentFragment();
  var tagIndex = 0;
  var numTags = tags.length;
  var textPos = 0;
  var textLength = text.length;
  var currentNode = result;

  // output one tag or text node every iteration
  while (textPos < textLength || tagIndex < numTags) {
    var tag;
    var tagPos;
    if (tagIndex < numTags) {
      tag = tags[tagIndex];
      tagPos = tag.pos;
    }
    else {
      tagPos = textLength;
    }

    if (tagPos <= textPos) {
      // output the tag
      if (tag.node) {
        // start tag
        var newNode = tag.node;
        currentNode.appendChild(newNode);
        currentNode = newNode;
      }
      else {
        // end tag
        currentNode = currentNode.parentNode;
      }
      tagIndex++;
    }
    else {
      // output text
      currentNode.appendChild(doc.createTextNode(text.substring(textPos, tagPos)));
      textPos = tagPos;
    }
  }

  return result;
}
463206
def _handle_tag_close_close(self):
        """"""
        strip = lambda tok: tok.text.rstrip().lower()
        closing = self._pop()
        if len(closing) != 1 or (not isinstance(closing[0], tokens.Text) or
                                 strip(closing[0]) != strip(self._stack[1])):
            self._fail_route()
        self._emit_all(closing)
        self._emit(tokens.TagCloseClose())
        return self._pop()
49101
public function renderOpeningTag() : string
    {
        $result = '<' . $this->name;

        foreach ($this->attributes as $name => $value) {
            $result .= sprintf(' %s="%s"', $name, htmlspecialchars($value, ENT_COMPAT | ENT_HTML5));
        }

        $result .= '>';

        return $result;
    }
894170
function readOpenTag() {
		// Read tag name
		let start = getSourcePoint(),
			match = tagNameRegex.exec(source.substr(pos))
		if (!match) {
			throwSyntaxError('Invalid open tag')
		}
		let tagName = match[0].toLowerCase(),
			isVoid = voidElementsRegex.test(tagName)
		advanceTo(pos + tagName.length)

		// Keep reading content
		let selfClose = false,
			attributes = [],
			// Used to detect repeated attributes
			foundAttributeNames = []
		while (true) {
			// Match using anchored regex
			let match = tagOpenContentStartRegex.exec(source.substr(pos))
			if (!match) {
				throwSyntaxError('Invalid open tag')
			}

			advanceTo(pos + match[0].length)
			if (match[1] === '<%-') {
				throwSyntaxError('EJS unescaped tags are not allowed inside open tags')
			} else if (match[1] === '<%=') {
				throwSyntaxError('EJS escaped tags are not allowed inside open tags')
			} else if (match[1] === '<%') {
				throwSyntaxError('EJS eval tags are not allowed inside open tags')
			} else if (match[1] === '>') {
				break
			} else if (match[1] === '/>') {
				selfClose = true
				break
			} else {
				// Attribute start
				let lowerName = match[1].toLowerCase()
				if (foundAttributeNames.indexOf(lowerName) !== -1) {
					throwSyntaxError(`Repeated attribute ${match[1]} in open tag ${tagName}`)
				}
				foundAttributeNames.push(lowerName)
				attributes.push(readAttribute(lowerName))
			}
		}

		if (!isVoid && selfClose) {
			throwSyntaxError('Self-closed tags for non-void elements are not allowed')
		}

		return {
			type: 'element',
			start,
			end: getSourcePoint(),
			name: tagName,
			isVoid,
			attributes,
			children: []
		}
	}
1333904
function(i) {
				var key = 'p' + i;
				
				if (!(key in memo)) {
					memo[key] = false;
					if (text.charAt(i) == '<') {
						var substr = text.slice(i);
						if ((m = substr.match(reOpenTag))) {
							memo[key] = openTag(i, m);
						} else if ((m = substr.match(reCloseTag))) {
							memo[key] = closeTag(i, m);
						}
					}
				}
				
				return memo[key];
			}
839540
protected function outputClosingTag()
    {
        echo '</', htmlspecialchars($this->_tag), '>';
        if ($this->_tag == 'html' || $this->_tag == 'head' || $this->_tag == 'body') {
            echo "\n";
        }
    }
200540
function readCloseTag() {
		let start = getSourcePoint(),
			match = tagCloseRegex.exec(source.substr(pos))
		if (!match) {
			throwSyntaxError('Invalid close tag')
		}
		advanceTo(pos + match[0].length)
		let end = getSourcePoint()
		return {
			type: 'tag-close',
			start,
			end,
			name: match[1].toLowerCase()
		}
	}
207274
public static String tag(String tag, String... content) {
		return openTag(tag, null, null, content) + closeTag(tag);
	}
60743
def _handle_tag_close_open(self, data, token):
        """"""
        if data.context & (data.CX_ATTR_NAME | data.CX_ATTR_VALUE):
            self._push_tag_buffer(data)
        self._emit(token(padding=data.padding_buffer["first"]))
        self._head += 1
136898
function singleTag(indent, tag, attrs, content) {
    tag = tag.replace(/\$$/,'');
    attrs = getClosedAttr(content, attrs);
    return `${indent}<${tag + attrs}>\n`;
}