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
1 changed files with 1 additions and 1 deletions

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)
}