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

Improve compatibility with DocToc action #310

Closed
mdeweerd opened this issue Feb 23, 2022 · 5 comments
Closed

Improve compatibility with DocToc action #310

mdeweerd opened this issue Feb 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@mdeweerd
Copy link

Describe the problem/need and solution

Context
Use https://github.com/marketplace/actions/toc-generator and mdformat "together".

Problem / Idea

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- param::isNotitle::true:: -->
<!-- param::maxHeaderLevel::4:: -->

<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
<!-- END doctoc generated TOC please keep comment here to allow auto update -->

changes to

 <!-- START doctoc generated TOC please keep comment here to allow auto update -->

 <!-- param::isNotitle::true:: -->

 <!-- param::maxHeaderLevel::4:: -->

And the options are no longer used by doctoc in this action and disappear.

Solution
This could be fixed by skipping that section/adding a method to skip sections.

Benefit
This allows automatic TOC generation while keeping the DocToc options.

Guide for implementation

No response

Tasks and updates

No response

@mdeweerd mdeweerd added the enhancement New feature or request label Feb 23, 2022
@welcome
Copy link

welcome bot commented Feb 23, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@hukkin
Copy link
Owner

hukkin commented Feb 23, 2022

Thanks for the issue!

I'm hesitant to add special casing like this. I'd suggest one of the following first

@mdeweerd
Copy link
Author

Ok, I'll am checking out mdformat-toc.

However - seeing that mdformat-toc also uses html comments -- a feature to exlude part of the md file formatting could "fix" this and other particularities.

<!-- mdformat-skip -->
Not reformatted.
<!-- mdformat-skip-end -->

@mdeweerd
Copy link
Author

  • Thanks for your reply & hint.

@hukkin
Copy link
Owner

hukkin commented Feb 23, 2022

a feature to exlude part of the md file formatting could "fix" this

An issue for this exists: #53

Thanks for your reply & hint.

You're welcome! Please close this issue if mdformat-toc solves your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants