Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: toc generator #72

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: toc generator #72

wants to merge 3 commits into from

Conversation

aryan02420
Copy link

@aryan02420 aryan02420 commented Sep 28, 2024

resolves #4

I am unable to get mdbox/parsers to initialize in the test runner. Until then I have written a basic toc generator.

- [sub heading 1](#sub-heading-1)
- [sub heading 2](#sub-heading-2)
- [heading with link](#heading-with-link)
- [heading with footnote](#heading-with-footnote)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is broken. The ast for this node is

[
  {
    "type": "h2",
    "children": [
      "heading with footnote",
      {
        "type": "footnoteReference"
      }
    ]
  },
  {
    "type": "footnoteDefinition",
    "children": [
      {
        "type": "p",
        "children": ["this is a footnote"]
      }
    ]
  }
]

The slug generated by this plugin is #heading-with-footnote while github generates #heading-with-footnote1

@aryan02420 aryan02420 changed the title add basic toc generator feat: toc generator Sep 28, 2024
@aryan02420 aryan02420 marked this pull request as ready for review September 28, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TOC Generator
1 participant