aboutsummaryrefslogtreecommitdiff
path: root/test/command/3057.md
AgeCommit message (Collapse)AuthorFilesLines
2019-09-06Improve detection of headings in Divs by hierarchicalize.John MacFarlane1-5/+7
The structure ``` <h1>one</h1> <div> <h1>two</h1> </div> ``` should create two coordinate sections, not a section with a subsection. Now it does. Extends #3057.
2019-09-05Shared.hierarchicalize: improve handling of div and section structure.John MacFarlane1-0/+54
Previously Divs were opaque to hierarchicalize, so headings inside divs didn't get into the table of contents, for example (#3057). Now hierarchicalize treats Divs as sections when appropriate. For example, these structures both yield a section and a subsection: ``` html <div> <h1>one</h1> <div> <h2>two</h2> </div> </div> ``` ``` html <div> <h1>one</h1> <div> <h1>two</h1> </div> </div> ``` Note that ``` html <h1>one</h1> <div> <h2>two</h2> </div> <h1>three</h1> ``` gets parsed as the structure one two three which may not always be desirable. Closes #3057.