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

Section links not checked in md files #26

Closed
marcindulak opened this issue Feb 17, 2024 · 6 comments · Fixed by #34, #40 or #42
Closed

Section links not checked in md files #26

marcindulak opened this issue Feb 17, 2024 · 6 comments · Fixed by #34, #40 or #42

Comments

@marcindulak
Copy link
Contributor

marcindulak commented Feb 17, 2024

The example below uses docker #23

  1. build the image of the latest linkspector from source
    git clone https://github.com/UmbrellaDocs/linkspector
    cd linkspector
    docker build --build-arg LINKSPECTOR_PACKAGE= -t umbrelladocs/linkspector .
    
  2. run linkspector check on a test directory
    mkdir test
    cp .gitignore test  # due to https://github.com/UmbrellaDocs/linkspector/issues/24
    echo '[my-section](#my-section-missing)' > test/test.md
    echo '## My section' >> test/test.md
    docker run --rm -it -v $PWD/test:/app --name linkspector umbrelladocs/linkspector bash -c 'linkspector check'
    

Output

⠋ Configuration file not found. Using default configuration.
✨ Success: All hyperlinks in the specified files are valid.

An error due to a missing section link is expected.

@marcindulak
Copy link
Contributor Author

It does not appear to me that this is fixed using c35eb55.

Please use the test instructions provided in the issue description (cp .gitignore test is no longer needed), and reopen the issue if needed.

@marcindulak
Copy link
Contributor Author

It still seems not working for me as expected with 9dc2d13

@gaurav-nelson gaurav-nelson reopened this May 7, 2024
@gaurav-nelson
Copy link
Contributor

Section links in the same file are not checked.

@marcindulak
Copy link
Contributor Author

I hope this could be implemented. This is a popular functionality looking at the number of linked issues under tcort/markdown-link-check#304, which used to implement it, but broke recently.

@gaurav-nelson
Copy link
Contributor

gaurav-nelson commented May 8, 2024

Top level / links are still broken. Hopefully they are fixed. @marcindulak Let me know if you still find any issues.

@marcindulak
Copy link
Contributor Author

The test case from the issue does not fail as expected for me using 9524b58, using the Dockerfile from #23

docker build --no-cache --pull --build-arg LINKSPECTOR_PACKAGE= -t umbrelladocs/linkspector .
rm -rf test
mkdir test
echo '[my-section](#my-section-missing)' > test/test.md
echo '## My section' >> test/test.md
docker run --rm -it -v $PWD/test:/app --name linkspector umbrelladocs/linkspector bash -c 'linkspector check'

Output

⠋ Configuration file not found. Using default configuration.
✨ Success: All hyperlinks in the specified files are valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment