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 ?
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?
ok, seems to me right now, all the toc are collected, ex.
h2,h3, but when theliis added one by one, we add allh2and then allh3. Is this a bug ?in the old library, jQuery seems to nail this properly
so now I wonder if can the new
findtake a list of tags?