Generates a heading tag (h1 to h6)  with some content.

@param headingTag the heading tag to be generated
@param body content for the tag
@return an HtmlTree object for the tag
176035
public static HtmlTree HEADING(HtmlTag headingTag, Content body) {
        return HEADING(headingTag, false, null, body);
    }
1178047
private Tag getTag(Element node, Tag... tags) {
        String name = node.getTagName();
        String error = null;
        
        try {
            Tag tag = Tag.valueOf(name.toUpperCase());
            int i = ArrayUtils.indexOf(tags, tag);

            if (i < 0) {
                error = "Tag '%s' is not valid at this location";
            } else {
                if (!tag.allowMultiple) {
                    tags[i] = null;
                }

                return tag;
            }
        } catch (IllegalArgumentException e) {
            error = "Unrecognized tag '%s' in layout";
        }

        throw new IllegalArgumentException(getInvalidTagError(error, name, tags));
    }
1273512
public Builder tag(String tag) {
        ends.push("</" + tag + ">");
        html.a('<').a(tag).a('>');
        return this;
    }
572687
public static HtmlTree SPAN(HtmlStyle styleClass, Content body) {
        HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body));
        if (styleClass != null)
            htmltree.addStyle(styleClass);
        return htmltree;
    }
984497
function generateHeadingSelector(headingIndexingLevel) {
  let headingsSelector = 'h1';
  for (let i = 2; i <= headingIndexingLevel; i += 1) {
    headingsSelector += `, h${i}`;
  }
  return headingsSelector;
}
115783
public Content getSummaryTableHeader(String[] header, String scope) {
        Content tr = new HtmlTree(HtmlTag.TR);
        int size = header.length;
        Content tableHeader;
        if (size == 1) {
            tableHeader = new StringContent(header[0]);
            tr.addContent(HtmlTree.TH(HtmlStyle.colOne, scope, tableHeader));
            return tr;
        }
        for (int i = 0; i < size; i++) {
            tableHeader = new StringContent(header[i]);
            if(i == 0)
                tr.addContent(HtmlTree.TH(HtmlStyle.colFirst, scope, tableHeader));
            else if(i == (size - 1))
                tr.addContent(HtmlTree.TH(HtmlStyle.colLast, scope, tableHeader));
            else
                tr.addContent(HtmlTree.TH(scope, tableHeader));
        }
        return tr;
    }
668512
public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) {
        HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body));
        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
        if (styleClass != null)
            htmltree.addStyle(styleClass);
        return htmltree;
    }
1051438
public SimpleHTMLTag addSubTag(SimpleHTMLTag tag) {
        if (tag == this) {
            throw new IllegalArgumentException("The tag cannot be its own parent");
        }

        if (subTags == null) {
            subTags = new ArrayList<>();
        }

        subTags.add(tag);

        return this;
    }
539923
public static HtmlTree A_ID(HtmlStyle styleClass, String id, Content body) {
        HtmlTree htmltree = A_ID(id, body);
        if (styleClass != null)
            htmltree.addStyle(styleClass);
        return htmltree;
    }
101099
private static int headingIndex(Element element) {
    String tagName = element.tagName();
    if (tagName.startsWith("h")) {
      try {
        return Integer.parseInt(tagName.substring(1));
      }
      catch (Throwable ex) {
        throw new IllegalArgumentException("Must be a header tag: " + tagName, ex);
      }
    }
    else {
      throw new IllegalArgumentException("Must be a header tag: " + tagName);
    }
  }
536866
private static void appendTag(String tag, StringBuilder buffer) {
        if (buffer.length() != 0) {
            buffer.append(UNDERSCORE);
        }

        buffer.append(tag);
    }
1259072
private static HashMap<String, Double> cmmlNodeToHistrogram(Node node, String tagName) throws XPathExpressionException {
        final NodeList elements = XMLHelper.getElementsB(node, "*//*:" + tagName);
        return contentElementsToHistogram(elements);
    }
685043
protected HtmlTree getPackageTreeHeader() {
        String packageName = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement);
        String title = packageName + " " + configuration.getText("doclet.Window_Class_Hierarchy");
        HtmlTree bodyTree = getBody(true, getWindowTitle(title));
        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
                ? HtmlTree.HEADER()
                : bodyTree;
        addTop(htmlTree);
        addNavLinks(true, htmlTree);
        if (configuration.allowTag(HtmlTag.HEADER)) {
            bodyTree.addContent(htmlTree);
        }
        return bodyTree;
    }
616925
public static void remove(Tag tag) {
	Body body = (Body) tag.getParent();
	body.getStatements().remove(tag);
    }
99893
public static Document parseBodyFragment(String bodyHtml, String baseUri) {
        return Parser.parseBodyFragment(bodyHtml, baseUri);
    }
1344028
protected function removeHtmlTag(Node $body, $lineno)
    {
        if (0 === \count($body)) {
            $body = new Node([$body], [], $lineno);
        }

        $this->removeTagContent($body, 0, '/(|\ \\t|\\n|\\n\ \\t)<([a-zA-Z0-9]+)[a-zA-Z\=\'\"\ \/]+>(\\n?|\\r?)/');
        $this->removeTagContent($body, \count($body) - 1, '/(|\ \\t|\\n|\\n\ \\t|\\n)<\/[a-zA-Z]+>/');

        return $body;
    }
1296606
private MailContent tag(String tag) {
        ends.push("</" + tag + ">");
        html.a('<').a(tag).a('>');
        return this;
    }