/*!
Returns false, telling the template parser that this is a single tag.
13846
function hasChildren()
    {
        return array( $this->SetName => false,
                      $this->LetName => true,
                      $this->DefaultName => true );
    }
883404
function(element) {
    // There should be exactly 1 element child which is a P:
    if (element.children.length != 1 || element.children[0].tagName !== "P") {
      return false;
    }

    // And there should be no text nodes with real content
    return !this._someNode(element.childNodes, function(node) {
      return node.nodeType === this.TEXT_NODE &&
             this.REGEXPS.hasContent.test(node.textContent);
    });
  }
288007
public boolean hasNext()
    {
        if ( _matcher == null )
        {
            return false;
        }
        if ( _literal != null || _token != null )
        {
            return true;
        }
        if ( _matcher.find() )
        {
            _literal = _template.subSequence( _endPrevios, _matcher.start() ).toString();
            _token = _matcher.group();
            _endPrevios = _matcher.end();
        }
        else if ( _endPrevios < _template.length() )
        {
            // We're at the end
            _literal = _template.subSequence( _endPrevios, _template.length() ).toString();
            _endPrevios = _template.length();

            // Remove the matcher so it doesn't reset itself
            _matcher = null;
        }
        return _literal != null || _token != null;
    }
1288462
protected function tagName() {
        $tok = $this->scanner->current();
        if (!ctype_alpha($tok)) {
            return false;
        }

        // We know this is at least one char.
        $name = strtolower($this->scanner->charsWhile(":_-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"));
        $attributes = array();
        $selfClose = false;

        // Handle attribute parse exceptions here so that we can
        // react by trying to build a sensible parse tree.
        try {
            do {
                $this->scanner->whitespace();
                $this->attribute($attributes);
            } while (!$this->isTagEnd($selfClose));
        } catch (HTML5_Parser_Exception $e) {
            $selfClose = false;
        }

        $mode = $this->events->startTag($name, $attributes, $selfClose);
        // Should we do this? What does this buy that selfClose doesn't?
        if ($selfClose) {
            $this->events->endTag($name);
        } elseif (is_int($mode)) {
            // fprintf(STDOUT, "Event response says move into mode %d for tag %s", $mode, $name);
            $this->setTextMode($mode, $name);
        }

        $this->scanner->next();

        return true;
    }
1338571
function _tag_open( &$parser, $tag, $attributes ) {
		$this->currentElement = strtoupper( $tag );

		switch( $this->currentElement ) {
			case 'DROP':
				$this->drop();
				break;
			case 'CLUSTERED':
			case 'BITMAP':
			case 'UNIQUE':
			case 'FULLTEXT':
			case 'HASH':
				// Add index Option
				$this->addIndexOpt( $this->currentElement );
				break;
			default:
				// print_r( array( $tag, $attributes ) );
		}
	}
1090876
function isSupportedElement( element, mode ) {
		if ( mode == CKEDITOR.ELEMENT_MODE_INLINE )
			return element.is( CKEDITOR.dtd.$editable ) || element.is( 'textarea' );
		else if ( mode == CKEDITOR.ELEMENT_MODE_REPLACE )
			return !element.is( CKEDITOR.dtd.$nonBodyContent );
		return 1;
	}
876891
public function isVoidElement($tag = null)
    {
        if (null === $tag) {
            $tag = $this->getTag();
        }

        return in_array($tag, $this->voidElements);
    }
338763
function inTemplateTag(line) {
                if (line <= 1) {
                    return false
                }
                const lineStartIndex = sourceCode.getIndexFromLoc({
                    line,
                    column: 0,
                })
                return microTemplateService.inTemplateTag(lineStartIndex - 1)
            }
1170253
function (node) {
            var len = nodeLength(node);

            if (len === 0) {
                return true;
            } else if (!isText(node) && len === 1 && node.innerHTML === blankHTML) {
                // ex) <p><br></p>, <span><br></span>
                return true;
            } else if (list.all(node.childNodes, isText) && node.innerHTML === '') {
                // ex) <p></p>, <span></span>
                return true;
            }

            return false;
        }
620772
public boolean isTagSupported(Element e)
    {
        if (e.getNodeName() != null && supported.contains(e.getNodeName().toLowerCase())) //completely supported tags
            return true;
        else //special cases
        {
            //empty anchor elements must be preserved
            if (e.getNodeName().toLowerCase().equals("a") && e.hasAttribute("name") 
                    && (e.getTextContent() == null || e.getTextContent().trim().length() == 0))
                return true;
            else
                return false;
        }
    }
87269
function check(node) {
            const isTemplateElement = node.type === "TemplateElement";

            if (
                isTemplateElement &&
                node.parent &&
                node.parent.parent &&
                node.parent.parent.type === "TaggedTemplateExpression" &&
                node.parent === node.parent.parent.quasi
            ) {

                // Don't report tagged template literals, because the backslash character is accessible to the tag function.
                return;
            }

            if (typeof node.value === "string" || isTemplateElement) {

                /*
                 * JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/.
                 * In addition, backticks are not supported by JSX yet: https://github.com/facebook/jsx/issues/25.
                 */
                if (node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement" || node.parent.type === "JSXFragment") {
                    return;
                }

                const value = isTemplateElement ? node.value.raw : node.raw.slice(1, -1);
                const pattern = /\\[^\d]/gu;
                let match;

                while ((match = pattern.exec(value))) {
                    validateString(node, match);
                }
            } else if (node.regex) {
                parseRegExp(node.regex.pattern)

                    /*
                     * The '-' character is a special case, because it's only valid to escape it if it's in a character
                     * class, and is not at either edge of the character class. To account for this, don't consider '-'
                     * characters to be valid in general, and filter out '-' characters that appear in the middle of a
                     * character class.
                     */
                    .filter(charInfo => !(charInfo.text === "-" && charInfo.inCharClass && !charInfo.startsCharClass && !charInfo.endsCharClass))

                    /*
                     * The '^' character is also a special case; it must always be escaped outside of character classes, but
                     * it only needs to be escaped in character classes if it's at the beginning of the character class. To
                     * account for this, consider it to be a valid escape character outside of character classes, and filter
                     * out '^' characters that appear at the start of a character class.
                     */
                    .filter(charInfo => !(charInfo.text === "^" && charInfo.startsCharClass))

                    // Filter out characters that aren't escaped.
                    .filter(charInfo => charInfo.escaped)

                    // Filter out characters that are valid to escape, based on their position in the regular expression.
                    .filter(charInfo => !(charInfo.inCharClass ? REGEX_GENERAL_ESCAPES : REGEX_NON_CHARCLASS_ESCAPES).has(charInfo.text))

                    // Report all the remaining characters.
                    .forEach(charInfo => report(node, charInfo.index, charInfo.text));
            }

        }
13507
protected function isMarkdownable()
    {
        if (!isset($this->isMarkdownable[$this->parser->tagName])) {
            // simply not markdownable

            return false;
        }
        if ($this->parser->isStartTag) {
            $return = true;
            if ($this->keepHTML) {
                $diff = array_diff(array_keys($this->parser->tagAttributes), array_keys($this->isMarkdownable[$this->parser->tagName]));
                if (!empty($diff)) {
                    // non markdownable attributes given
                    $return = false;
                }
            }
            if ($return) {
                foreach ($this->isMarkdownable[$this->parser->tagName] as $attr => $type) {
                    if ($type == 'required' && !isset($this->parser->tagAttributes[$attr])) {
                        // required markdown attribute not given
                        $return = false;
                        break;
                    }
                }
            }
            if (!$return) {
                array_push($this->notConverted, $this->parser->tagName . '::' . implode('/', $this->parser->openTags));
            }

            return $return;
        } else {
            if (!empty($this->notConverted) && end($this->notConverted) === $this->parser->tagName . '::' . implode('/', $this->parser->openTags)) {
                array_pop($this->notConverted);

                return false;
            }

            return true;
        }
    }
779598
protected function endTag() {
        if ($this->scanner->current() != '/') {
            return false;
        }
        $tok = $this->scanner->next();

        // a-zA-Z -> tagname
        // > -> parse error
        // EOF -> parse error
        // -> parse error
        if (!ctype_alpha($tok)) {
            $this->parseError("Expected tag name, got '%s'", $tok);
            if ($tok == "\0" || $tok === false) {
                return false;
            }
            return $this->bogusComment('</');
        }

        $name = strtolower($this->scanner->charsUntil("\n\f \t>"));
        // Trash whitespace.
        $this->scanner->whitespace();

        if ($this->scanner->current() != '>') {
            $this->parseError("Expected >, got '%s'", $this->scanner->current());
            // We just trash stuff until we get to the next tag close.
            $this->scanner->charsUntil('>');
        }

        $this->events->endTag($name);
        $this->scanner->next();
        return true;
    }
794147
function () {
    var text = '[' + this.tag

    _.each(this.attrs.numeric, function (value) {
      if (/\s/.test(value)) {
        text += ' "' + value + '"'
      } else {
        text += ' ' + value
      }
    })

    _.each(this.attrs.named, function (value, name) {
      text += ' ' + name + '="' + value + '"'
    })

    // If the tag is marked as `single` or `self-closing`, close the
    // tag and ignore any additional content.
    if (this.type === 'single') {
      return text + ']'
    } else if (this.type === 'self-closing') {
      return text + ' /]'
    }

    // Complete the opening tag.
    text += ']'

    if (this.content) {
      text += this.content
    }

    // Add the closing tag.
    return text + '[/' + this.tag + ']'
  }
577577
protected function tagOpen() {
        if ($this->scanner->current() != '<') {
            return false;
        }

        // Any buffered text data can go out now.
        $this->flushBuffer();

        $this->scanner->next();

        return $this->markupDeclaration() || $this->endTag() || $this->processingInstruction() || $this->tagName() ||
                /*  This always returns false. */
                $this->parseError("Illegal tag opening") || $this->characterData();
    }
132788
function isIgnores(leftToken, leftIndex, rightToken) {
            const tokensAndComments = sourceCode.tokensAndComments
            const leftTemplateTag = getTemplateTagByToken(leftToken)
            const rightTemplateTag = getTemplateTagByToken(rightToken)
            if (!leftTemplateTag || !rightTemplateTag) {
                return true
            }

            // Ignore if token is the first token of the template tag script
            if (
                !sourceCode.text
                    .slice(
                        rightTemplateTag.expressionStart.range[1],
                        rightToken.range[0]
                    )
                    .trim()
            ) {
                return true
            }

            // Ignore comments that are the last token on their line if `ignoreEOLComments` is active.
            if (
                ignoreEOLComments &&
                isCommentToken(rightToken) &&
                (leftIndex === tokensAndComments.length - 2 ||
                    rightToken.loc.end.line <
                        tokensAndComments[leftIndex + 2].loc.start.line)
            ) {
                return true
            }

            // Ignore tokens that are in a node in the "exceptions" object
            if (hasExceptions) {
                const parentNode = sourceCode.getNodeByRangeIndex(
                    rightToken.range[0] - 1
                )

                if (parentNode && exceptions[parentNode.type]) {
                    return true
                }
            }
            return false
        }
102794
function handleTag_pre() {
    if ($this->keepHTML && $this->parser->isStartTag) {
      # check if a simple <code> follows
      if (!preg_match('#^\s*<code\s*>#Us', $this->parser->html)) {
        # this is no standard markdown code block
        $this->handleTagToText();
        return;
      }
    }
    $this->indent('    ');
    if (!$this->parser->isStartTag) {
      $this->setLineBreaks(2);
    } else {
      $this->parser->html = ltrim($this->parser->html);
    }
  }