Skip to content

Generation of flat list of ul li has some order problem #80

Description

@windmaomao

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions