Fixed toc extension to work without wmd-title class
This commit is contained in:
parent
f799dea7bb
commit
bacc1a7408
@ -1,5 +1,5 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
#Date Tue Nov 19 2013 00:39:24
|
#Date Tue Nov 19 2013 00:58:39
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
res/worker.js
|
res/worker.js
|
||||||
|
@ -20656,7 +20656,7 @@ function() {
|
|||||||
return i[r] = !0, e.id = r, r;
|
return i[r] = !0, e.id = r, r;
|
||||||
}
|
}
|
||||||
var i = {}, o = [];
|
var i = {}, o = [];
|
||||||
return t.each(u.querySelectorAll(".preview-content > .wmd-title"), function(t) {
|
return t.each(u.querySelectorAll("h1, h2, h3, h4, h5, h6"), function(t) {
|
||||||
o.push(new s(t.tagName, e(t), t.textContent));
|
o.push(new s(t.tagName, e(t), t.textContent));
|
||||||
}), o = a(o), '<div class="toc">\n<ul>\n' + o.join("") + "</ul>\n</div>\n";
|
}), o = a(o), '<div class="toc">\n<ul>\n' + o.join("") + "</ul>\n</div>\n";
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
var elementList = [];
|
var elementList = [];
|
||||||
_.each(previewContentsElt.querySelectorAll('.preview-content > .wmd-title'), function(elt) {
|
_.each(previewContentsElt.querySelectorAll('h1, h2, h3, h4, h5, h6'), function(elt) {
|
||||||
elementList.push(new TocElement(elt.tagName, createAnchor(elt), elt.textContent));
|
elementList.push(new TocElement(elt.tagName, createAnchor(elt), elt.textContent));
|
||||||
});
|
});
|
||||||
elementList = groupTags(elementList);
|
elementList = groupTags(elementList);
|
||||||
|
Loading…
Reference in New Issue
Block a user