Update the heading hierarchy.