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

Regex not excluding internal links #43

Open
JackMcKew opened this issue Oct 2, 2020 · 1 comment
Open

Regex not excluding internal links #43

JackMcKew opened this issue Oct 2, 2020 · 1 comment

Comments

@JackMcKew
Copy link

Hey!

Thank you for this amazing tool!

I've tried using it to do the link verification of a static site generator package (packit.dev), but I want to exclude all internal links (eg, ones beginning with "/" or "{"). Here's the example: https://regex101.com/r/De199r/1

I've tried the regex in all sorts of ways, but it doesn't ever seem to exclude them, from my understanding this might be due to the time of evaluation (it checks the internal before it checks if it should exclude)

You can see all my attempts to get this working in this repo https://github.com/JackMcKew/packit.dev and subsequent github actions fired with the errors https://github.com/JackMcKew/packit.dev/actions

Maybe I'm making a silly error, but I'd love to be able to use this package for this purpose

Thank you!

@JackMcKew JackMcKew changed the title Regex not including internal links Regex not excluding internal links Oct 2, 2020
@MichaIng
Copy link

MichaIng commented Oct 18, 2020

Found the same. I guess it is not the extended regex set that is supported, e.g. (pattern1|pattern2) does not work, and ?/+ meaning would then also not work. So like you use grep or sed without -E flag (on distros where it's not default). I'm just going to verify this.
EDIT: Nope, even simple words have no effect, like: -x phpbb

	ERROR	phpbb/viewtopic.php?f=8&t=5#p43
		Stat site/phpbb/viewtopic.php: no such file or directory
	ERROR	phpbb/viewtopic.php?f=8&t=5#p45
		Stat site/phpbb/viewtopic.php: no such file or directory
...

It looks like local/internal links are generally not processed for exclusion somehow, btw regardless if relative or absolute paths.

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

No branches or pull requests

2 participants