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

Anchor link checking fails #304

Closed
MikeMcC399 opened this issue Mar 11, 2024 · 8 comments · Fixed by crytic/solana-lints#94
Closed

Anchor link checking fails #304

MikeMcC399 opened this issue Mar 11, 2024 · 8 comments · Fixed by crytic/solana-lints#94

Comments

@MikeMcC399
Copy link

MikeMcC399 commented Mar 11, 2024

markdown-link-check reports a 404 error when checking a correctly formatted link such as

[Good regular link](#link1)
# link1

This is a regression from markdown-link-check@3.11.2.

markdown-link-check version

3.12.1

Operating system

Ubuntu 22.04.4 LTS

Node.js version

v20.11.1 LTS

Steps to reproduce

Execute:

mkdir md-link-test
cd md-link-test
npm install markdown-link-check

Create a Markdown file test.md with the following contents

| Link source                 | Should | 3.8.7    | 3.11.2   | 3.12.1   |
| --------------------------- | ------ | -------- | -------- | -------- |
| [Good regular link](#link1) | Pass   | Pass     | Pass     | **Fail** |
| [Good link in HTML](#link2) | Pass   | Pass     | **Fail** | **Fail** |
| [Bad link](#link3)          | Fail   | **Pass** | Fail     | Fail     |

**Targets**

# link1

<a id='link2'>Link 2</a>

Execute:

npx markdown-link-check test.md

Note the failure: [✖] #link1 → Status: 404

Test with 3.11.2

Execute:

npm install markdown-link-check@3.11.2
npx markdown-link-check test.md

Note the correct success of testing link1: [✓] #link1

Logs from 3.12.1

$ npx markdown-link-check test.md

FILE: test.md
  [✖] #link1
  [✖] #link2
  [✖] #link3

  3 links checked.

  ERROR: 3 dead links found!
  [✖] #link1 → Status: 404
  [✖] #link2 → Status: 404
  [✖] #link3 → Status: 404

Related issue

@MikeMcC399
Copy link
Author

This is a showstopper for updating to markdown-link-check@latest (3.12.1).

@dklimpel
Copy link
Contributor

dklimpel commented Mar 11, 2024

It is a regression in 2eb21a1

IMO it is dependency markdown-link-extractor.

@MikeMcC399
Copy link
Author

@dklimpel

It is a regression in 2eb21a1

IMO it is dependency markdown-link-extractor.

Thank you for locating the source of the regression. I can confirm that the issue also exists in 3.12.0. You would need to add the --ignore workaround to demonstrate this, i.e.:

npx markdown-link-check test.md --ignore nothing

For some reason, the CI test has the hash-links test being skipped, so anchors are not tested:

it.skip('check hash links', function (done) {
markdownLinkCheck(fs.readFileSync(path.join(__dirname, 'hash-links.md')).toString(), {}, function (err, result) {
expect(err).to.be(null);
expect(result).to.eql([
{ link: '#foo', statusCode: 200, err: null, status: 'alive' },
{ link: '#bar', statusCode: 200, err: null, status: 'alive' },
{ link: '#potato', statusCode: 404, err: null, status: 'dead' },
{ link: '#tomato', statusCode: 404, err: null, status: 'dead' },
]);
done();
});
});

@dklimpel
Copy link
Contributor

dklimpel commented Mar 11, 2024

It was broken.

98ba6bf

:-/

@dklimpel
Copy link
Contributor

dklimpel commented Mar 11, 2024

ewollesen added a commit to tidepool-org/TidepoolApi that referenced this issue Mar 12, 2024
There's a regression they're working to fix, it'll probably be fixed soon, but
in the meantime...

tcort/markdown-link-check#304
ewollesen added a commit to tidepool-org/TidepoolApi that referenced this issue Mar 12, 2024
There's a regression they're working to fix, it'll probably be fixed soon, but
in the meantime...

tcort/markdown-link-check#304
ewollesen added a commit to tidepool-org/TidepoolApi that referenced this issue Mar 12, 2024
There's a regression they're working to fix, it'll probably be fixed soon, but
in the meantime...

tcort/markdown-link-check#304
wilyle added a commit to eclipse-ibeji/freyja that referenced this issue Mar 13, 2024
Currently, Freyja is using cargo git dependencies to reference the proto packages from other ESDV projects such as Ibeji. This has caused compatibility issues and needs to be updated. This PR makes a change to pull the content from a remote URL and build the proto files within the Freyja repo. Inspired by UProtocol: https://github.com/eclipse-uprotocol/up-rust/blob/main/build.rs

Also makes a minor update to the install instructions in the README, which required updating the markdown-ci workflow due to a recent regression in the tool that it uses (see tcort/markdown-link-check#304)

Fixes #157
stormc added a commit to stormc/wfx that referenced this issue Mar 15, 2024
Pin markdown-link-check to version 3.11.2 until
tcort/markdown-link-check#304
is resolved in the 3.12.x series.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
stormc added a commit to stormc/wfx that referenced this issue Mar 15, 2024
Pin markdown-link-check to version 3.11.2 until
tcort/markdown-link-check#304
is resolved in the 3.12.x series.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
stormc added a commit to siemens/wfx that referenced this issue Mar 15, 2024
Pin markdown-link-check to version 3.11.2 until
tcort/markdown-link-check#304
is resolved in the 3.12.x series.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
alrra added a commit to alrra/dotfiles that referenced this issue Mar 24, 2024
wingy3181 added a commit to wingy3181/dotfiles that referenced this issue Apr 1, 2024
adamconnelly added a commit to spacelift-io/user-documentation that referenced this issue Apr 2, 2024
It looks like the latest version doesn't support anchors properly
(tcort/markdown-link-check#304).
@AvinZarlez
Copy link

AvinZarlez commented Apr 5, 2024

I also ran into this issue today on 3.12.1.

rjaegers added a commit to philips-software/amp-devcontainer that referenced this issue Apr 24, 2024
Disabling markdown-link-check linter because of regression related to checking anchors (see: tcort/markdown-link-check#304).

Lychee is also enabled for all repository files and covers the same features as markdown-link-check.
github-merge-queue bot pushed a commit to philips-software/amp-devcontainer that referenced this issue Apr 24, 2024
* ci(deps): bump the github-actions group with 3 updates

Bumps the github-actions group with 3 updates: [oxsecurity/megalinter](https://github.com/oxsecurity/megalinter), [reviewdog/action-suggester](https://github.com/reviewdog/action-suggester) and [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request).


Updates `oxsecurity/megalinter` from 7.10.0 to 7.11.1
- [Release notes](https://github.com/oxsecurity/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](oxsecurity/megalinter@a7a0163...03986e6)

Updates `reviewdog/action-suggester` from 1.11.0 to 1.12.0
- [Release notes](https://github.com/reviewdog/action-suggester/releases)
- [Commits](reviewdog/action-suggester@3d7fde6...185c9c0)

Updates `amannn/action-semantic-pull-request` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](amannn/action-semantic-pull-request@e9fabac...c24d6dd)

---
updated-dependencies:
- dependency-name: oxsecurity/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: reviewdog/action-suggester
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: amannn/action-semantic-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>

* ci: disable markdown-link-check linter

Disabling markdown-link-check linter because of regression related to checking anchors (see: tcort/markdown-link-check#304).

Lychee is also enabled for all repository files and covers the same features as markdown-link-check.

* ci: use correct key to disable markdown-link-check

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ron <45816308+rjaegers@users.noreply.github.com>
@MikeMcC399

This comment was marked as resolved.

@MikeMcC399
Copy link
Author

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

Successfully merging a pull request may close this issue.

3 participants