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

Confusing link-external-filter example #10780

Open
soxofaan opened this issue Sep 12, 2024 · 5 comments · May be fixed by quarto-dev/quarto-web#1332 or #10806
Open

Confusing link-external-filter example #10780

soxofaan opened this issue Sep 12, 2024 · 5 comments · May be fixed by quarto-dev/quarto-web#1332 or #10806
Assignees
Labels
documentation Doc improvements & quarto-web

Comments

@soxofaan
Copy link

What would you like to do?

Report an issue on quarto.org

Description

The example for the link-external-filter config is a bit confusing:

For example
^(?:http:|https:)\/\/www\.quarto\.org\/custom
will treat links that start with http://www.quarto.org as internal links

what is that custom doing in the example regex? Is that part of the regex (meaning that it has to be part of the link to be considered internal)? Or is that a special syntax for something?

@soxofaan soxofaan added the documentation Doc improvements & quarto-web label Sep 12, 2024
@cscheid
Copy link
Collaborator

cscheid commented Sep 12, 2024

I don't think this needs changing. The confusion can be solved by experimenting with the option, and understanding regexes are necessary to using them.

@cscheid cscheid closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2024
@soxofaan
Copy link
Author

I guess I should have expressed this problem less vague.

There is a bug in the documentation, it currently says:

^(?:http:|https:)\/\/www\.quarto\.org\/custom
will treat links that start with http://www.quarto.org/ as internal links

Which is wrong: http://www.quarto.org/foo starts with http://www.quarto.org/ but it will not be caught by the regex

I guess the docs should be changed to

^(?:http:|https:)\/\/www\.quarto\.org\/
will treat links that start with http://www.quarto.org/ as internal links

or to

^(?:http:|https:)\/\/www\.quarto\.org\/custom
will treat links that start with http://www.quarto.org/custom as internal links

@cscheid
Copy link
Collaborator

cscheid commented Sep 13, 2024

I gotcha. Can you make a PR?

@mcanouil
Copy link
Collaborator

@mcanouil mcanouil self-assigned this Sep 16, 2024
mcanouil added a commit to mcanouil/quarto-cli that referenced this issue Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Doc improvements & quarto-web
Projects
None yet
3 participants