-
Notifications
You must be signed in to change notification settings - Fork 326
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
fix: link-external-newwindow: true
not respected by default listing
#9469
base: main
Are you sure you want to change the base?
Conversation
I'm a bit confused about the fix here; I would have expected there to be a condition that needs to be checked depending on |
That's the thing I did not figure out yet. The option seems to be applied at another level as I did not find anything in Edit: this is why removing this class makes the external new window option works. The option is used as part of a JavaScript script which is added to HTML when the option is true.
|
Just a note that this PR is exactly a revert of commit 8c61f7e So I don't know exactly why it was added this way with no-external, but it seems it was done on purpose. I'll ask Charles as he is around. |
Yes, I was looking into it to find what was the reason for this to be done only in the default. @dragonstyle in case you recall why you did add the |
Do not merge. |
I've tested on various website listings (6) and did not see any issues. |
I believe what needs to be tested if all the feature that removing From the code it seems to mean
Currently, both of this won't happen to links with After discussing with @dragonstyle last week, he does not remember why exactly but was warning us that it could have been made following some slack discussion for some of our doc website, and that it could trigger other stuff. Now, things may have changed since then, and maybe removing the class won't trigger anything bad 🤔 |
Indeed, that might be the issue Charles tried to fix. I think the "noexternal" fix is wrong. Wrong in the sense that other listing will have the same issues. What do you think? |
This pull request fixes the issue where the
link-external-newwindow
option was not being respected by the default listing type. The problem was occurring when generating the HTML for the listing items, specifically in theitem-default.ejs.md
file. The code has been modified to remove the "no-external" class from the anchor tags, allowing the link to open in a new window as intended when usinglink-external-newwindow: true
.Fixes #9468.
tested on:
quarto create project blog demo Demo
externa.qmd
FYI: the no-external class is not used anywhere else in the codebase but it is used in the following JavaScript
https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/html/templates/quarto-html.ejs#L366-L367
Should
:not(.no-external)
also be removed?