Open windmaomao opened 6 years ago
ok, seems to me right now, all the toc are collected, ex. h2,h3, but when the li is added one by one, we add all h2 and then all h3. Is this a bug ?
h2,h3
li
h2
h3
const selectors = el.dataset.toc.split(',').map(s => s.trim()); selectors.forEach(selector => { const items = find(selector, container);
in the old library, jQuery seems to nail this properly
var headings = $(opts.selectors, container);
so now I wonder if can the new find take a list of tags?
find
Still have this problem...
ok, seems to me right now, all the toc are collected, ex.
h2,h3
, but when theli
is added one by one, we add allh2
and then allh3
. Is this a bug ?in the old library, jQuery seems to nail this properly
so now I wonder if can the new
find
take a list of tags?