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

detect absolute links #553

Closed
DiegoVinasco opened this issue Mar 8, 2023 · 0 comments · Fixed by #548
Closed

detect absolute links #553

DiegoVinasco opened this issue Mar 8, 2023 · 0 comments · Fixed by #548

Comments

@DiegoVinasco
Copy link
Contributor

There is a flaw with remark validate links...

Bascially, Remark doesn't validate absolute links (which are accepted by github in markdown documents). It only checks relative links or URLs.

This means that we might still have some broken links. This was worked around in the private repository here by using a sed command with some pipes to prefix absolute markdown links with a given URL:

export BASE_URI='https://github.com/VCityTeam/VCity/blob/master'
files=$(find . -name '*.md')
for f in $files
do
  grep -E '\[{1}.*\]{1}\({1}/{1}.*\){1}' "$f" | sed -i "s|](/|]($BASE_URI/|g" "$f"
done
remark -u validate-links .

I think it would be a good idea to do the same in UD-Viz. Maybe in a different PR? Any thoughts?

Originally posted by @DiegoVinasco in #548 (comment)

@valentinMachado valentinMachado linked a pull request Mar 9, 2023 that will close this issue
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.

1 participant