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

Reading existing markdown should populate headers for the TOC #33

Open
symbiont-jon-bogaty opened this issue May 26, 2020 · 5 comments
Open
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@symbiont-jon-bogaty
Copy link

Currently as of May 26th, 2020, on version 1.2.1, if I read an existing markdown file in and then generate a table of contents the table of contents is either blank or just contains new headers.

This makes it impossible to source an existing markdown file as a template, build off of it, and create an encompassing table of contents.

The underlying data store for the read markdown appears to be the generated text store with no attempt made to parse the underlying existing structures. One thought I had was perhaps as a compromise to avoid having to fully parse existing markdown, a regular expression could fire after reading existing markdown to at least ensure the TOC is correct?

@didix21
Copy link
Owner

didix21 commented May 27, 2020

mdutils was not intended for parsing markdown files. But the thruth seems a good feature. So a good start as you say can be a parser for getting all Headers of an existing Markdown file.

@didix21 didix21 added enhancement New feature or request help wanted Extra attention is needed labels May 27, 2020
@Roman-Ka
Copy link

Hi! If this is still relevant, can I have a stab? I would love to have this feature. I am new to open source, so it's not going to be quick but it seems there isn't a massive rush :)

@didix21
Copy link
Owner

didix21 commented Aug 13, 2020

All yours! @Roman-Ka Thank you for contributing! I think it can be an interesting feature.

@widal001
Copy link

@didix21 I came to this project looking for a similar set of functionality. I've been looking for a library that can can parse and manipulate markdown without first having to convert it to html like most existing parsers do (python-markdown, mistune, marko, etc.) Is this something you'd be willing to include into the roadmap of this project? If you'd be open to supporting that functionality, I'd be happy to create a separate issue dedicated to starting that effort.

Also understand if this feels outside the scope of mdutils. This just happens to be library I've found that is closest to supporting that use case.

@didix21
Copy link
Owner

didix21 commented Jan 11, 2021

@widal001 it's an interesting feature, unfortunately I don't have much time for developing such feature. Right now I'm only doing the necessary maintenance of this repo. I hope having more time in the future but now impossible. In any case, I think we can define the requirements and use cases of it in this issue.

@didix21 didix21 added the good first issue Good for newcomers label Jul 9, 2021
@didix21 didix21 added this to To Do in mdutils improvements Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Development

No branches or pull requests

4 participants