agentofuser / rehype-section

Wraps headings and their contents in `<section>` elements.
https://npm.im/@agentofuser/rehype-section
7 stars 1 forks source link

Port to remark? #7

Open agentofuser opened 5 years ago

agentofuser commented 5 years ago

Just found out about https://github.com/jake-low/remark-sectionize, which might have made this unnecessary 🤦‍♂️

In my defense, there's the classnames and stuff. Maybe contribute remark code upstream to remark-sectionize.

nkuehn commented 5 years ago

Opinion: I don't see the rehype-based implementation as unnecessary. E.g. when using MDX, not all headings are generated on markdown-level, some could be the result of rendering a react component. Update: Does not work since the react components are mdxhast and thereforce not touched by plugins working on hast