Annotating table of content entries skipped level

Hi Simple,

Thanks for your answer!

To keep you posted, in the absence of activity on this discussion I’ve merged what I proposed a few hours before your answer. As the next release is not too close, it is still time to improve this change though.

Your point is interesting but imo having a “bad” document structure should not have a impact on the document presentation in read mode.
What we could do though it highlight the nodirectchild bullets by having a visual clue in edit mode. To help editor spot the issue.

For instance, with the css below, the toc looks like this in edit mode when headings are skipped:

image

[contenteditable='true'] .wikitoc li.nodirectchild::before {
  content: "!";
  color: red;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  float: left;
}