h5o / h5o-js

HTML5 outliner (JavaScript)
MIT License
115 stars 15 forks source link

Detect headings in <details> tag #16

Closed dominykas closed 9 years ago

dominykas commented 10 years ago

From deniss...@gmail.com on May 21, 2012 11:35:38

  1. Add a h1 tag in

    of

    of

  2. Check the outline Demo: http://fiddle.jshell.net/yGq9V/show/ I expect to see "Level 1 title > Level 2 title". Instead, I see "Level 1 title > Section".

Here is a tool, which does it correctly (I think): http://gsnedders.html5.org/outliner/process.py?url=http&#37;3A&#37;2F&#37;2Ffiddle.jshell.net&#37;2FyGq9V&#37;2Fshow&#37;2F I am using Chrome extension on Linux, but I don't think that matters.

Original issue: http://code.google.com/p/h5o/issues/detail?id=16

dominykas commented 9 years ago

details element is a sectioning root element according to the spec. This means that the h1 inside of it is a heading for the details and not for the section that contains the details.