public DocWriter closeHeading() {
        headingDepth--;
        if (headingDepth < 0) {
            throw new CodegenException(
                    "Attempted to close a heading when at the base heading level.");
        }
        write("");
        return this;
    }
Closes the current heading, cleaning any context created for the current level,
then writes a blank line.

@return returns the writer.
smithy-docgen/src/main/java/software/amazon/smithy/docgen/writers/DocWriter.java