-
Notifications
You must be signed in to change notification settings - Fork 117
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
Check GitHub markdown section links #312
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rkitover
force-pushed
the
section-links
branch
2 times, most recently
from
April 12, 2024 00:23
a005469
to
8a8e477
Compare
Extract markdown heading lines and convert to section link names, check all section links against this list, first removing any code blocks, and return a 404 for any that do not have a heading. Check for `baseUrl` option prepended section links as well. Add tests for this functionality. Make some minor adjustments for the tests to pass on Windows. Fix tcort#250 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
@tcort I have added tests. |
@tcort ping, can you take a look please, I need this feature to work on my document and other people would appreciate it too |
@tcort ping again. I hope you are doing well. I will wait a couple more weeks for you to respond then I will have to fork this module, which I would really prefer to avoid. |
Thank you, I really appreciate this, hope you can get a new release out soon. |
cgrindel-self-hosted-renovate bot
referenced
this pull request
in cgrindel/bazel-starlib
May 22, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [markdown-link-check](https://togithub.com/tcort/markdown-link-check) | dependencies | patch | [`3.12.1` -> `3.12.2`](https://renovatebot.com/diffs/npm/markdown-link-check/3.12.1/3.12.2) | --- ### Release Notes <details> <summary>tcort/markdown-link-check (markdown-link-check)</summary> ### [`v3.12.2`](https://togithub.com/tcort/markdown-link-check/releases/tag/v3.12.2) [Compare Source](https://togithub.com/tcort/markdown-link-check/compare/v3.12.1...v3.12.2) #### What's Changed - fix status badge in README by [@​dklimpel](https://togithub.com/dklimpel) in [https://github.com/tcort/markdown-link-check/pull/303](https://togithub.com/tcort/markdown-link-check/pull/303) - enable skipped tests for hash links by [@​dklimpel](https://togithub.com/dklimpel) in [https://github.com/tcort/markdown-link-check/pull/306](https://togithub.com/tcort/markdown-link-check/pull/306) - chore(deps): bump actions/setup-node from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/300](https://togithub.com/tcort/markdown-link-check/pull/300) - chore: Upgrade to ESLint 9 by [@​nschonni](https://togithub.com/nschonni) in [https://github.com/tcort/markdown-link-check/pull/318](https://togithub.com/tcort/markdown-link-check/pull/318) - Check GitHub markdown section links by [@​rkitover](https://togithub.com/rkitover) in [https://github.com/tcort/markdown-link-check/pull/312](https://togithub.com/tcort/markdown-link-check/pull/312) - docs: add example for GitLab pipeline by [@​dklimpel](https://togithub.com/dklimpel) in [https://github.com/tcort/markdown-link-check/pull/309](https://togithub.com/tcort/markdown-link-check/pull/309) - ci: Use matrix for cross-OS testing by [@​nschonni](https://togithub.com/nschonni) in [https://github.com/tcort/markdown-link-check/pull/307](https://togithub.com/tcort/markdown-link-check/pull/307) - chore(deps): bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/301](https://togithub.com/tcort/markdown-link-check/pull/301) - chore(deps): bump commander from 10.0.1 to 12.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/322](https://togithub.com/tcort/markdown-link-check/pull/322) - chore(deps-dev): bump eslint from 8.57.0 to 9.3.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/321](https://togithub.com/tcort/markdown-link-check/pull/321) - chore(deps-dev): bump mocha from 10.3.0 to 10.4.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/311](https://togithub.com/tcort/markdown-link-check/pull/311) - chore(deps-dev): bump express from 4.18.3 to 4.19.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/308](https://togithub.com/tcort/markdown-link-check/pull/308) - chore(deps-dev): bump express from 4.18.3 to 4.19.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/310](https://togithub.com/tcort/markdown-link-check/pull/310) #### New Contributors - [@​rkitover](https://togithub.com/rkitover) made their first contribution in [https://github.com/tcort/markdown-link-check/pull/312](https://togithub.com/tcort/markdown-link-check/pull/312) **Full Changelog**: tcort/markdown-link-check@v3.12.1...v3.12.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
renovate bot
referenced
this pull request
in open-feature/spec
May 25, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [markdown-link-check](https://togithub.com/tcort/markdown-link-check) | [`3.11.2` -> `3.12.2`](https://renovatebot.com/diffs/npm/markdown-link-check/3.11.2/3.12.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/markdown-link-check/3.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/markdown-link-check/3.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/markdown-link-check/3.11.2/3.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/markdown-link-check/3.11.2/3.12.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>tcort/markdown-link-check (markdown-link-check)</summary> ### [`v3.12.2`](https://togithub.com/tcort/markdown-link-check/releases/tag/v3.12.2) [Compare Source](https://togithub.com/tcort/markdown-link-check/compare/v3.12.1...v3.12.2) #### What's Changed - fix status badge in README by [@​dklimpel](https://togithub.com/dklimpel) in [https://github.com/tcort/markdown-link-check/pull/303](https://togithub.com/tcort/markdown-link-check/pull/303) - enable skipped tests for hash links by [@​dklimpel](https://togithub.com/dklimpel) in [https://github.com/tcort/markdown-link-check/pull/306](https://togithub.com/tcort/markdown-link-check/pull/306) - chore(deps): bump actions/setup-node from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/300](https://togithub.com/tcort/markdown-link-check/pull/300) - chore: Upgrade to ESLint 9 by [@​nschonni](https://togithub.com/nschonni) in [https://github.com/tcort/markdown-link-check/pull/318](https://togithub.com/tcort/markdown-link-check/pull/318) - Check GitHub markdown section links by [@​rkitover](https://togithub.com/rkitover) in [https://github.com/tcort/markdown-link-check/pull/312](https://togithub.com/tcort/markdown-link-check/pull/312) - docs: add example for GitLab pipeline by [@​dklimpel](https://togithub.com/dklimpel) in [https://github.com/tcort/markdown-link-check/pull/309](https://togithub.com/tcort/markdown-link-check/pull/309) - ci: Use matrix for cross-OS testing by [@​nschonni](https://togithub.com/nschonni) in [https://github.com/tcort/markdown-link-check/pull/307](https://togithub.com/tcort/markdown-link-check/pull/307) - chore(deps): bump actions/checkout from 3 to 4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/301](https://togithub.com/tcort/markdown-link-check/pull/301) - chore(deps): bump commander from 10.0.1 to 12.1.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/322](https://togithub.com/tcort/markdown-link-check/pull/322) - chore(deps-dev): bump eslint from 8.57.0 to 9.3.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/321](https://togithub.com/tcort/markdown-link-check/pull/321) - chore(deps-dev): bump mocha from 10.3.0 to 10.4.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/311](https://togithub.com/tcort/markdown-link-check/pull/311) - chore(deps-dev): bump express from 4.18.3 to 4.19.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/308](https://togithub.com/tcort/markdown-link-check/pull/308) - chore(deps-dev): bump express from 4.18.3 to 4.19.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/tcort/markdown-link-check/pull/310](https://togithub.com/tcort/markdown-link-check/pull/310) #### New Contributors - [@​rkitover](https://togithub.com/rkitover) made their first contribution in [https://github.com/tcort/markdown-link-check/pull/312](https://togithub.com/tcort/markdown-link-check/pull/312) **Full Changelog**: tcort/markdown-link-check@v3.12.1...v3.12.2 ### [`v3.12.1`](https://togithub.com/tcort/markdown-link-check/blob/HEAD/CHANGELOG.md#Version-3121) [Compare Source](https://togithub.com/tcort/markdown-link-check/compare/v3.12.0...v3.12.1) - fix: fix crash [#​297](https://togithub.com/tcort/markdown-link-check/issues/297) [@​CanadaHonk](https://togithub.com/CanadaHonk) - Set `ipv4first` for tests in CI [@​dklimpel](https://togithub.com/dklimpel) - Bump node for release [@​dklimpel](https://togithub.com/dklimpel) ### [`v3.12.0`](https://togithub.com/tcort/markdown-link-check/blob/HEAD/CHANGELOG.md#Version-3120) [Compare Source](https://togithub.com/tcort/markdown-link-check/compare/v3.11.2...v3.12.0) - feat: add basic ignore subpaths argument [@​CanadaHonk](https://togithub.com/CanadaHonk) - feat: add global option to replacementPatterns [@​CanadaHonk](https://togithub.com/CanadaHonk) - refactor: replace url.parse with new URL [@​CanadaHonk](https://togithub.com/CanadaHonk) - docs: update readme to be clearer for projectBaseUrl opt [@​nwcm](https://togithub.com/nwcm) - feat: Add support to load md files via proxy [@​dklimpel](https://togithub.com/dklimpel) - chore: upgrade dependencies </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/spec). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjM2OC4xMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extract markdown heading lines and convert to section link names, check all section links against this list and return a 404 for any that do not have a heading.
Filter out code blocks because comments can be false positives for markdown headers.
Make some minor adjustments for the tests to pass on Windows.
Fix #250