Ignore h6 headers

h6 headers are used for tags in CodiMD. So we should ignore them for the
ToC generation.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-07-04 11:20:59 +02:00
parent 4fe0620853
commit cf934a4e51
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD

View file

@ -28,7 +28,7 @@
Toc.prototype._collectTitleElements = function () {
this._elTitlesNames = []
this.elTitleElements = []
for (var i = 1; i < 7; i++) {
for (var i = 1; i < 6; i++) {
if (this.el.getElementsByTagName('h' + i).length) {
this._elTitlesNames.push('h' + i)
}