-
Notifications
You must be signed in to change notification settings - Fork 29
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
Feature request: Generate a table of contents #1456
Comments
Also cc @hoylen, author of |
Not for me, because markdown_toc has already been written without using the markdown package since my utility produces Markdown (text) output rather than HTML output. Also because it needs to treat headings differently: it respects the heading level (i.e. the number of #'s is significant) rather than just nesting, and whether headings are represented using #'s versus underlining is significant. This proposal assumes the Markdown file was written "correctly" and that definition of correctness goes beyond what the (unfortunately/deliberately loose) Markdown specification dictates. So I suspect different users will want to detect/handle "wrong" Markdown differently, and they have a different idea of what is wrong for them. For example, one user might want to treat bad level nesting as an error (e.g. a #### heading under a ## heading, when a ### heading is missing), but another might allow it. It seems the markdown package works at the low level Abstract Syntax Tree (AST) level of a Markdown document, but this |
Just a note, this API's
That could be a boolean option in Thanks for your input |
Something like this:
I may be misunderstanding
Document
here -- its API does not include aList<Node>
, so given the typical approach of:would I need to make a
TocNode generataeToc(List<Node> nodes)
instead?Code for parsing can be found at dart-lang/pub-dev#8348. See the discussion there for context, but the motivation is to eventually generate a ToC on the side of Pub package pages.
The text was updated successfully, but these errors were encountered: