Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implemented nesting support in document outline. #5314
Before nested headings were totally ignored now we show them with a representation of their nesting path.
How Has This Been Tested?
Verify documented outline and the countings panel work as expected, e.g: the warnings are still displayed and the countings are correct.
Screenshots (jpeg or gifs if applicable):
This implementation looks like a good start. I'm wondering, though, if there is some parent issue or any discussion somewhere on this topic.
A couple of thoughts on my mind:
- Will there be justifiable scenarios where heading levels have different weights by virtue of belonging to a nested context?
- What does nesting (and notably multidimensional nesting) mean for the flow of the document, and thus its outline?
These are really interesting questions. W3.org has a section about outlines and they even provide an algorithm to correctly implement them https://www.w3.org/TR/2011/WD-html5-20110525/sections.html#outlines.
As a very short summary, headings inside these elements "blockquote body details fieldset figure td" (section root) should not count or appear in the parent document outline.
Provided right now we can not nest headings inside section root or section content, from the outline algorithm point of view there is no nesting. So it looks like right now nesting does not change weights. We are just showing the nesting path in the outline as a way to make the structure more intuitive to the user, and make it easier to navigate in the document.
As nesting involves we should keep eye on this.