basyura / inkdrop-sidetoc

inkdrop's side toc plugin
https://my.inkdrop.app/plugins/sidetoc
MIT License
19 stars 4 forks source link

Request: support for underline-ish style #7

Closed aviscaerulea closed 2 years ago

aviscaerulea commented 3 years ago

Inkdrop supports underline-ish style for H1 and H2 headers. The official toc plugin also supports underline-ish style, so it would be nice if sidetoc could support it as well.

https://docs.inkdrop.app/manual/markdown-cheatsheet/#headers

basyura commented 3 years ago

Thank you for reporting!

Currently, I'm parsing text like this. So simply.

// count of #
let i = 0;
for (; i < v.length; i++) {
  if (v[i] != "#") {
    break;
  }
}

Maybe I can parse underline-ish, but I don't use that. f more than 3 people need this, I will do it.