jgallen23 / toc

Table of Contents Plugin
http://projects.jga.me/toc/
MIT License
531 stars 111 forks source link

Need to take sectioning roots into account #19

Closed davemerrill closed 10 years ago

davemerrill commented 11 years ago

Content inside certain elements is supposed to belong to its own separate outline structure, and shouldn't be included in the main outline, whose root is the document body. See this discussion of section roots..

jgallen23 commented 11 years ago

if you want to change the scope of TOC, just pass in container: '.some-selector'

davemerrill commented 11 years ago

Sorry if I'm not being clear. This isn't a runtime choice people should be able to make, it's how the spec says it should work, as I understand it. Content inside blockquote, figure, details, fieldset, and td doesn't participate in the main outline, as discussed in the link I provided.

jgallen23 commented 11 years ago

gotcha. I haven't had the need for this, but if you want to submit a pull request, I'll accept it.