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

Links to upper directories fail in md files #27

Closed
marcindulak opened this issue Feb 17, 2024 · 0 comments · Fixed by #33
Closed

Links to upper directories fail in md files #27

marcindulak opened this issue Feb 17, 2024 · 0 comments · Fixed by #33

Comments

@marcindulak
Copy link
Contributor

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 -p test/nested
    cp .gitignore test  # due to https://github.com/UmbrellaDocs/linkspector/issues/24
    echo '[test-relative](../test.md)' > test/nested/nested.md
    echo '[nested-absolute](/nested/nested.md)' > test/test.md
    echo '[nested-relative](./nested/nested.md)' >> 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.
🚫 nested/nested.md, ../test.md, 404, 1, Cannot find: ../test.md.
❌ Error: Some links in the specified files are not valid.

It is expected that 'linkspector check' passes. It is a reproduction example for #22

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

Successfully merging a pull request may close this issue.

1 participant