Skip to content

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