You need to extend the `---` as well so it equal to or longer than the length of the text. Otherwise sphinx won't generate a heading.