Skip to content

Markdown-toc fails if there are multiple .md files #8

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

Closed
nymous opened this issue Jun 4, 2020 · 11 comments
Closed

Markdown-toc fails if there are multiple .md files #8

nymous opened this issue Jun 4, 2020 · 11 comments

Comments

@nymous
Copy link

nymous commented Jun 4, 2020

After #4 landed the precommit fails if multiple Markdown files are present, because markdown-toc doesn't support multiple input files on its CLI. This is sad because it was the point of that PR 😅

This issue has been reported by Yajo itself here pre-commit/pre-commit#1374

My current workaround is to use the pre-commit offered by DocToc (as mentioned in the pre-commit issue).

Note: This issue is more of a heads-up for others who would run into the same problem because it would need to be fixed in the markdown-toc project directly.

@Lucas-C
Copy link
Owner

Lucas-C commented Jun 4, 2020

I opened jonschlinkert/markdown-toc#162 to suggest the evolution in markdown-toc

@nymous
Copy link
Author

nymous commented Jun 4, 2020

Awesome! I was checking in the upstream issues to see if someone already asked for this before creating a new one but you beat me to it ^^

@beliaev-maksim
Copy link

would be helpful to have it

now have to use multiple hooks for each file:

  - repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
    rev: v1.1.1
    hooks:
      - id: markdown-toc
        name: README.md-toc
        files: ^README\.md$
      - id: markdown-toc
        name: configuration.md-toc
        files: .*/configuration\.md$
      - id: markdown-toc
        name: CONTRIBUTE.md-toc
        files: .*/CONTRIBUTE\.md$

@Lucas-C
Copy link
Owner

Lucas-C commented Nov 8, 2021

This depend on jonschlinkert/markdown-toc#162
You may want to drop a comment there

@beliaev-maksim
Copy link

@Lucas-C
we got a green light for update of CLI

would you like to create a PR for this?

@drjasonharrison-vp-eio
Copy link

What do we need to fix this?

@Lucas-C
Copy link
Owner

Lucas-C commented Mar 18, 2022

Have this PR merged: jonschlinkert/markdown-toc#172

@drjasonharrison
Copy link

drjasonharrison commented Mar 18, 2022

How much longer to wait until we just switch to your fork of the repo?
Or maybe @Lucas-C would be willing to take on the latest leading fork? https://github.com/Lucas-C/markdown-toc

@beliaev-maksim
Copy link

+1 on switching the fork until they merge

@Lucas-C
Copy link
Owner

Lucas-C commented Mar 18, 2022

I released a v1.1.2 version that uses my GitHub fork of the markdown-toc lib

This issue should be solved now

@Lucas-C Lucas-C closed this as completed Mar 18, 2022
@drjasonharrison
Copy link

Thanks @Lucas-C!

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

No branches or pull requests

5 participants