cmaas / markdown-it-table-of-contents

A table of contents plugin for Markdown-it
MIT License
99 stars 33 forks source link

Adds optional list attributes #59

Closed nicofranzp closed 1 month ago

nicofranzp commented 2 years ago

Would close #58

nicofranzp commented 2 years ago

Hi, thanks for the reply!

  1. I don't know how to provide a test 😬. Sorry! (literally my first PR)
  2. I see the unnecessary whitespace...
  3. I also understand why it might not be desirable to pass the same attributes to sublists and
  4. yes, a transformListElemet() would have solved all my problems if it allows me to add specific classes to the first ul.

As my Wishlist and experience is no too big, I would add a couple of if statements to get rid of the white space and avoid adding the attributes into sublists... I know is not the most general way of doing things, but it is within my reach. I don't know if this would cause trouble ahed either.

Maybe a discussion of a what to expect from and how to implement a custom formatting functions might inspire people to jump in?